|
|
@ -2,11 +2,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
const path = require('path');
|
|
|
|
const path = require('path');
|
|
|
|
const nconf = require('nconf');
|
|
|
|
const nconf = require('nconf');
|
|
|
|
|
|
|
|
|
|
|
|
nconf.argv().env({
|
|
|
|
nconf.argv().env({
|
|
|
|
separator: '__',
|
|
|
|
separator: '__',
|
|
|
|
});
|
|
|
|
});
|
|
|
|
const winston = require('winston');
|
|
|
|
const winston = require('winston');
|
|
|
|
const fork = require('child_process').fork;
|
|
|
|
const fork = require('child_process').fork;
|
|
|
|
|
|
|
|
|
|
|
|
const env = process.env;
|
|
|
|
const env = process.env;
|
|
|
|
var worker;
|
|
|
|
var worker;
|
|
|
|
|
|
|
|
|
|
|
@ -14,6 +16,7 @@ env.NODE_ENV = env.NODE_ENV || 'development';
|
|
|
|
|
|
|
|
|
|
|
|
const configFile = path.resolve(__dirname, nconf.any(['config', 'CONFIG']) || 'config.json');
|
|
|
|
const configFile = path.resolve(__dirname, nconf.any(['config', 'CONFIG']) || 'config.json');
|
|
|
|
const prestart = require('./src/prestart');
|
|
|
|
const prestart = require('./src/prestart');
|
|
|
|
|
|
|
|
|
|
|
|
prestart.loadConfig(configFile);
|
|
|
|
prestart.loadConfig(configFile);
|
|
|
|
|
|
|
|
|
|
|
|
var db = require('./src/database');
|
|
|
|
var db = require('./src/database');
|
|
|
|