1
0
mirror of https://github.com/microsoft/TypeScript-Node-Starter.git synced 2025-11-09 14:57:19 +00:00

update mongoose to v5

This commit is contained in:
Bowden Kelly
2019-03-25 14:56:30 -07:00
parent a3a3258c9b
commit 89f3e04868
3 changed files with 100 additions and 72 deletions

View File

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