fixed glob.sync in init.js
This commit is contained in:
parent
b7bdd067b6
commit
7cffc84422
|
@ -14,18 +14,16 @@ module.exports = function() {
|
|||
* Before we begin, lets set the environment variable
|
||||
* We'll Look for a valid NODE_ENV variable and if one cannot be found load the development NODE_ENV
|
||||
*/
|
||||
glob('./config/env/' + process.env.NODE_ENV + '.js', {
|
||||
sync: true
|
||||
}, function(err, environmentFiles) {
|
||||
if (!environmentFiles.length) {
|
||||
if (process.env.NODE_ENV) {
|
||||
console.error(chalk.red('No configuration file found for "' + process.env.NODE_ENV + '" environment using development instead'));
|
||||
} else {
|
||||
console.error(chalk.red('NODE_ENV is not defined! Using default development environment'));
|
||||
}
|
||||
|
||||
process.env.NODE_ENV = 'development';
|
||||
var environmentFiles = glob.sync('./config/env/' + process.env.NODE_ENV + '.js');
|
||||
if (!environmentFiles.length) {
|
||||
if (process.env.NODE_ENV) {
|
||||
console.error(chalk.red('No configuration file found for "' + process.env.NODE_ENV + '" environment using development instead'));
|
||||
} else {
|
||||
console.error(chalk.red('NODE_ENV is not defined! Using default development environment'));
|
||||
}
|
||||
});
|
||||
|
||||
process.env.NODE_ENV = 'development';
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
|
16
package.json
16
package.json
|
@ -13,7 +13,7 @@
|
|||
"url": "https://github.com/whitef0x0/NodeForms.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": "~0.12.6",
|
||||
"node": "~5.0.0",
|
||||
"npm": "~2.11.2"
|
||||
},
|
||||
"scripts": {
|
||||
|
@ -25,6 +25,7 @@
|
|||
"async": "^1.4.2",
|
||||
"body-parser": "~1.14.1",
|
||||
"bower": "~1.6.5",
|
||||
"brace-expansion": "^1.1.1",
|
||||
"chalk": "~1.1.1",
|
||||
"compression": "~1.6.0",
|
||||
"connect-flash": "~0.1.1",
|
||||
|
@ -54,16 +55,15 @@
|
|||
"grunt-nodemon": "~0.4.0",
|
||||
"helmet": "~0.14.0",
|
||||
"load-grunt-tasks": "~3.3.0",
|
||||
"lodash": "~3.10.1",
|
||||
"mailosaur": "^1.0.1",
|
||||
"lodash": "^2.4.1",
|
||||
"main-bower-files": "~2.9.0",
|
||||
"math": "0.0.3",
|
||||
"method-override": "~2.3.0",
|
||||
"mocha": ">=1.20.0",
|
||||
"mongoose": "~3.8.8",
|
||||
"mongoose-utilities": "~0.1.1",
|
||||
"morgan": "~1.6.1",
|
||||
"multer": "~0.1.8",
|
||||
"pdffiller": "~0.1.1",
|
||||
"multer": "^0.1.8",
|
||||
"nodemailer": "~1.8.0",
|
||||
"nools": "^0.4.1",
|
||||
"passport": "~0.3.0",
|
||||
|
@ -73,16 +73,14 @@
|
|||
"passport-linkedin": "~1.0.0",
|
||||
"passport-local": "~1.0.0",
|
||||
"passport-twitter": "~1.0.2",
|
||||
"pdffiller": "~0.1.1",
|
||||
"pkg-up": "^1.0.0",
|
||||
"raven": "^0.8.1",
|
||||
"request": "^2.60.0",
|
||||
"request-promise": "^1.0.2",
|
||||
"satelize": "~0.1.1",
|
||||
"shortid": "^2.2.2",
|
||||
"should": "~4.1.0",
|
||||
"soap": "^0.11.0",
|
||||
"supertest": "~0.14.0",
|
||||
"mongoose-utilities": "~0.1.1",
|
||||
"supertest-session": "^1.0.0",
|
||||
"swig": "~1.4.1",
|
||||
"then-fs": "~2.0.0"
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue