помог модуль forever
var forever = require('forever-monitor');
//------------------------------------------------------------
var child = new (forever.Monitor)('/var/www/nj/server.js',
{
'minUptime': 50,
'spinSleepTime': 10,
'logFile': '/var/www/nj/log_fr.txt', // Path to log output from forever process (when daemonized)
'outFile': '/var/www/nj/out_fr.txt', // Path to log output from child stdout
'errFile': '/var/www/nj/err_fr.txt' // Path to log output from child stderr
}