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

Commit 8592e13

Browse files
Use update indexes access in Mongoose configuration. Fixes #225
See: https://mongoosejs.com/docs/deprecations.html#ensureindex Thanks!
1 parent 722ebf8 commit 8592e13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app.ts

+1-1
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)