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