You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
342 B
JavaScript
19 lines
342 B
JavaScript
var fork = require('child_process').fork,
|
|
start = function() {
|
|
var nbb = fork('./app', process.argv.slice(2), {
|
|
env: {
|
|
'NODE_ENV': process.env.NODE_ENV
|
|
}
|
|
});
|
|
|
|
nbb.on('message', function(cmd) {
|
|
if (cmd === 'nodebb:restart') {
|
|
nbb.on('exit', function() {
|
|
start();
|
|
});
|
|
nbb.kill();
|
|
}
|
|
});
|
|
}
|
|
|
|
start(); |