diff --git a/examples/postgresql/index.js b/examples/postgresql/index.js index a3381b5..227aa72 100644 --- a/examples/postgresql/index.js +++ b/examples/postgresql/index.js @@ -5,7 +5,7 @@ var bodyParser = require('body-parser'); var express = require('express'); -var oauthServer = require('express-oauth-server'); +var OauthServer = require('express-oauth-server'); var render = require('co-views')('views'); var util = require('util'); @@ -17,7 +17,7 @@ app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); // Add OAuth server. -app.oauth = oauthServer({ +app.oauth = new OauthServer({ model: require('./model') }); diff --git a/examples/redis/index.js b/examples/redis/index.js index df087f9..abb92ac 100644 --- a/examples/redis/index.js +++ b/examples/redis/index.js @@ -5,7 +5,7 @@ var bodyParser = require('body-parser'); var express = require('express'); -var oauthServer = require('oauth2-server'); +var OauthServer = require('oauth2-server'); // Create an Express application. var app = express(); @@ -15,7 +15,7 @@ app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); // Add OAuth server. -app.oauth = oauthServer({ +app.oauth = new OauthServer({ model: require('./model') });