1
0
mirror of https://github.com/Foltik/Shimapan synced 2025-01-05 15:58:03 -05:00

Update mongo args for latest version

This commit is contained in:
Jack Foltz 2018-07-25 01:42:39 -04:00
parent 6211df933e
commit 883ec62c7a
Signed by: foltik
GPG Key ID: 303F88F996E95541
4 changed files with 5 additions and 6 deletions

View File

@ -1,3 +1,3 @@
{
"dbHost": "mongodb://localhost/shimapan"
"dbHost": "mongodb://localhost:27017/shimapan"
}

View File

@ -1,3 +1,3 @@
{
"dbHost": "mongodb://localhost/shimapan"
"dbHost": "mongodb://localhost:27017/shimapan"
}

View File

@ -1,3 +1,3 @@
{
"dbHost": "mongodb://localhost/shimapan-test"
"dbHost": "mongodb://localhost:27017/shimapan-test"
}

View File

@ -16,7 +16,7 @@ if(config.util.getEnv('NODE_ENV') !== 'test') {
}
mongoose.Promise = global.Promise;
mongoose.connect(config.dbHost, {useMongoClient: true});
mongoose.connect(config.dbHost, {useNewUrlParser: true});
const db = mongoose.connection;
db.on('error', function(err) {
if (err) console.log('MongoDB Connection Error: ', err);
@ -53,7 +53,6 @@ app.use(methodOverride('X-HTTP-Method-Override'));
//app.use(favicon(__dirname + '/public/img/favicon.ico'));
console.log(__dirname + '/public');
app.use(express.static(__dirname + '/public'));
@ -63,7 +62,7 @@ require('./config/passport.js');
// Start app
const port = process.env.PORT || 8080;
const server = app.listen(port);
var server = app.listen(port);
console.log('Listening on port ', port, '...');
// Handle sigint