Update server.js (#9)
Fixes DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead See: https://github.com/Automattic/mongoose/issues/5399
This commit is contained in:
parent
b1305f7fc2
commit
1a4be7f98a
@ -5,7 +5,7 @@ const bodyParser = require('body-parser')
|
||||
const cors = require('cors')
|
||||
|
||||
const mongoose = require('mongoose')
|
||||
mongoose.connect(process.env.MLAB_URI || 'mongodb://localhost/exercise-track' )
|
||||
mongoose.connect(process.env.MLAB_URI || 'mongodb://localhost/exercise-track', { useMongoClient: true } )
|
||||
|
||||
app.use(cors())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user