\r
\r
\r
-// Load the config, using -c argument if available\r
-(function (argv) {\r
- var conf_switch = argv.indexOf('-c');\r
- if (conf_switch !== -1) {\r
- if (argv[conf_switch + 1]) {\r
- return config.loadConfig(argv[conf_switch + 1]);\r
- }\r
- }\r
-\r
- config.loadConfig();\r
-\r
-})(process.argv);\r
-\r
-\r
-\r
+if (!require('./helpers/configloader.js')()) {\r
+ console.error('Couldn\'t find a valid config.js file (Did you copy the config.example.js file yet?)');\r
+ process.exit(1);\r
+}\r
\r
var source_files = [\r
global.config.public_http + '/src/app.js',\r
// Get our own version from package.json
global.build_version = require('../package.json').version;
-// Load the config, using -c argument if available
-(function (argv) {
- var conf_switch = argv.indexOf('-c');
- if (conf_switch !== -1) {
- if (argv[conf_switch + 1]) {
- return config.loadConfig(argv[conf_switch + 1]);
- }
- }
-
- config.loadConfig();
-
-})(process.argv);
+// Load the configuration
+require('./helpers/configloader.js')();
// If we're not running in the forground and we have a log file.. switch