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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user