Skip to content

Commit

Permalink
Merge pull request #27 from nanachimi/master
Browse files Browse the repository at this point in the history
Upgrade mongoose setup
  • Loading branch information
manjeshpv authored Jul 2, 2024
2 parents 848d064 + 40aece7 commit 535ec46
Show file tree
Hide file tree
Showing 5 changed files with 1,338 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.formatOnSave": false
}
6 changes: 5 additions & 1 deletion components/oauth/mongodb/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
/** https://github.com/dsquier/oauth2-server-php-mysql **/
var config = require('./../../../config')
var mongoose = require('mongoose');
var Promise = require('bluebird');
console.log(config.mongo.uri)
mongoose.connect(config.mongo.uri, function(err) {
mongoose.Promise = Promise;
mongoose.connect(config.mongo.uri,
{ keepAlive: true, useMongoClient: true },
function(err) {
if (err) return console.log(err);
console.log('Mongoose Connected');
});
Expand Down
2 changes: 1 addition & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
timezone: '+05:30',
},
mongo: {
uri: 'mongodb://gloryque:intranet@192.168.0.200:27017/gloryque_quarc'
uri: 'mongodb://localhost/oauth2'
},
seedDB:false,
seedMongoDB:false,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
],
"main": "index.js",
"dependencies": {
"bluebird": "^3.5.1",
"body-parser": "~1.13.2",
"cookie-parser": "~1.3.5",
"debug": "~2.2.0",
Expand Down
Loading

0 comments on commit 535ec46

Please sign in to comment.