1
0
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:
Orta
2019-09-07 09:07:04 +02:00
committed by GitHub

View File

@@ -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);