@ -9,11 +9,15 @@ var nconf = require('nconf'),
async = require ( 'async' ) ,
async = require ( 'async' ) ,
logrotate = require ( 'logrotate-stream' ) ,
logrotate = require ( 'logrotate-stream' ) ,
pkg = require ( './package.json' ) ,
pkg = require ( './package.json' ) ;
pidFilePath = _ _dirname + '/pidfile' ,
nconf . argv ( ) . env ( ) . file ( {
file : path . join ( _ _dirname , '/config.json' )
} ) ;
var pidFilePath = _ _dirname + '/pidfile' ,
output = logrotate ( { file : _ _dirname + '/logs/output.log' , size : '1m' , keep : 3 , compress : true } ) ,
output = logrotate ( { file : _ _dirname + '/logs/output.log' , size : '1m' , keep : 3 , compress : true } ) ,
silent = process . env . NODE _ENV !== 'development' ,
silent = nconf. get ( 'silent' ) !== false ,
numProcs ,
numProcs ,
workers = [ ] ,
workers = [ ] ,
@ -242,10 +246,6 @@ Loader.notifyWorkers = function(msg, worker_pid) {
} ) ;
} ) ;
} ;
} ;
nconf . argv ( ) . env ( ) . file ( {
file : path . join ( _ _dirname , '/config.json' )
} ) ;
fs . open ( path . join ( _ _dirname , 'config.json' ) , 'r' , function ( err ) {
fs . open ( path . join ( _ _dirname , 'config.json' ) , 'r' , function ( err ) {
if ( ! err ) {
if ( ! err ) {
if ( nconf . get ( 'daemon' ) !== false ) {
if ( nconf . get ( 'daemon' ) !== false ) {