|
|
@ -32,12 +32,12 @@ global.env = process.env.NODE_ENV || 'production';
|
|
|
|
|
|
|
|
|
|
|
|
winston.remove(winston.transports.Console);
|
|
|
|
winston.remove(winston.transports.Console);
|
|
|
|
winston.add(winston.transports.Console, {
|
|
|
|
winston.add(winston.transports.Console, {
|
|
|
|
colorize:true
|
|
|
|
colorize: true
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
winston.add(winston.transports.File, {
|
|
|
|
winston.add(winston.transports.File, {
|
|
|
|
filename:'error.log',
|
|
|
|
filename: 'error.log',
|
|
|
|
level:'error'
|
|
|
|
level: 'error'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: remove once https://github.com/flatiron/winston/issues/280 is fixed
|
|
|
|
// TODO: remove once https://github.com/flatiron/winston/issues/280 is fixed
|
|
|
@ -53,7 +53,9 @@ winston.info('');
|
|
|
|
|
|
|
|
|
|
|
|
if (fs.existsSync(__dirname + '/config.json') && (!nconf.get('setup') && !nconf.get('upgrade'))) {
|
|
|
|
if (fs.existsSync(__dirname + '/config.json') && (!nconf.get('setup') && !nconf.get('upgrade'))) {
|
|
|
|
// Load server-side config
|
|
|
|
// Load server-side config
|
|
|
|
nconf.file({ file: __dirname + '/config.json'});
|
|
|
|
nconf.file({
|
|
|
|
|
|
|
|
file: __dirname + '/config.json'
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
var meta = require('./src/meta.js');
|
|
|
|
var meta = require('./src/meta.js');
|
|
|
|
|
|
|
|
|
|
|
@ -93,7 +95,9 @@ if (fs.existsSync(__dirname + '/config.json') && (!nconf.get('setup') && !nconf.
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
} else if (nconf.get('upgrade')) {
|
|
|
|
} else if (nconf.get('upgrade')) {
|
|
|
|
nconf.file({ file: __dirname + '/config.json'});
|
|
|
|
nconf.file({
|
|
|
|
|
|
|
|
file: __dirname + '/config.json'
|
|
|
|
|
|
|
|
});
|
|
|
|
var meta = require('./src/meta.js');
|
|
|
|
var meta = require('./src/meta.js');
|
|
|
|
|
|
|
|
|
|
|
|
meta.configs.init(function() {
|
|
|
|
meta.configs.init(function() {
|
|
|
|