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.
nodebb/loader.js

19 lines
319 B
JavaScript

var fork = require('child_process').fork,
start = function() {
var nbb = fork('./app', [], {
env: {
'NODE_ENV': 'development'
}
});
nbb.on('message', function(cmd) {
if (cmd === 'nodebb:restart') {
nbb.kill();
setTimeout(function() {
start();
}, 1000);
}
});
};
start();