Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Commit ca14e7c

Browse files
author
Orta
authored
Merge pull request #226 from peterblazejewicz/fix/225
Use update indexes access in Mongoose configuration. Fixes #225
2 parents 722ebf8 + 8592e13 commit ca14e7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const app = express();
3030
const mongoUrl = MONGODB_URI;
3131
mongoose.Promise = bluebird;
3232

33-
mongoose.connect(mongoUrl, { useNewUrlParser: true} ).then(
33+
mongoose.connect(mongoUrl, { useNewUrlParser: true, useCreateIndex: true } ).then(
3434
() => { /** ready to use. The `mongoose.connect()` promise resolves to undefined. */ },
3535
).catch(err => {
3636
console.log("MongoDB connection error. Please make sure MongoDB is running. " + err);

0 commit comments

Comments
 (0)