We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 49a3a14 + 31bee73 commit 3518fe0Copy full SHA for 3518fe0
app/templates/server/app.js
@@ -13,7 +13,11 @@ var config = require('./config/environment');
13
<% if (filters.mongoose) { %>
14
// Connect to database
15
mongoose.connect(config.mongo.uri, config.mongo.options);
16
-
+mongoose.connection.on('error', function(err) {
17
+ console.error('MongoDB connection error: ' + err);
18
+ process.exit(-1);
19
+ }
20
+);
21
// Populate DB with sample data
22
if(config.seedDB) { require('./config/seed'); }
23
0 commit comments