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

added db connection log message

This commit is contained in:
Bowden
2018-01-04 18:08:12 -08:00
parent 31f3963b76
commit 454289e0ad

View File

@@ -31,6 +31,7 @@ const app = express();
// Connect to MongoDB
const mongoUrl = MONGODB_URI;
(<any>mongoose).Promise = bluebird;
logger.debug(`Connecting to database with connection string: ${mongoUrl}`);
mongoose.connect(mongoUrl, {useMongoClient: true}).then(
() => { /** ready to use. The `mongoose.connect()` promise resolves to undefined. */ },
).catch(err => {