We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d69333 commit ce2ee23Copy full SHA for ce2ee23
templates/express/server.js
@@ -21,7 +21,9 @@ var db = mongoose.connect(config.mongo.uri, config.mongo.options);
21
// Bootstrap models
22
var modelsPath = path.join(__dirname, 'lib/models');
23
fs.readdirSync(modelsPath).forEach(function (file) {
24
- require(modelsPath + '/' + file);
+ if (/(.*)\.(js$|coffee$)/.test(file)) {
25
+ require(modelsPath + '/' + file);
26
+ }
27
});
28
29
// Populate empty DB with sample data
0 commit comments