mirror of
https://github.com/microsoft/TypeScript-Node-Starter.git
synced 2025-11-08 16:17:37 +00:00
Merge pull request #226 from peterblazejewicz/fix/225
Use update indexes access in Mongoose configuration. Fixes #225
This commit is contained in:
@@ -30,7 +30,7 @@ const app = express();
|
||||
const mongoUrl = MONGODB_URI;
|
||||
mongoose.Promise = bluebird;
|
||||
|
||||
mongoose.connect(mongoUrl, { useNewUrlParser: true} ).then(
|
||||
mongoose.connect(mongoUrl, { useNewUrlParser: true, useCreateIndex: true } ).then(
|
||||
() => { /** ready to use. The `mongoose.connect()` promise resolves to undefined. */ },
|
||||
).catch(err => {
|
||||
console.log("MongoDB connection error. Please make sure MongoDB is running. " + err);
|
||||
|
||||
Reference in New Issue
Block a user