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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue