MongoDB connection error printed out with a console.error() instead of console.log() with a red method to make control the text color
This commit is contained in:
2
app.js
2
app.js
@ -40,7 +40,7 @@ var app = express();
|
|||||||
|
|
||||||
mongoose.connect(secrets.db);
|
mongoose.connect(secrets.db);
|
||||||
mongoose.connection.on('error', function() {
|
mongoose.connection.on('error', function() {
|
||||||
console.log('✗ MongoDB Connection Error. Please make sure MongoDB is running.'.red);
|
console.error('✗ MongoDB Connection Error. Please make sure MongoDB is running.');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user