1
0
mirror of https://github.com/microsoft/TypeScript-Node-Starter.git synced 2025-11-08 16:17:37 +00:00

Update Mongoose initialization

This commit is contained in:
Peter Blazejewicz
2019-06-22 22:10:37 +02:00
parent b69a12c969
commit 284a8ddddf

View File

@@ -34,7 +34,7 @@ const app = express();
const mongoUrl = MONGODB_URI;
(<any>mongoose).Promise = bluebird;
mongoose.connect(mongoUrl, { useMongoClient: true }).then(
mongoose.connect(mongoUrl, { useNewUrlParser: 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);