having the loader play nicely with supervisor -- ./nodebb watch can now hit the restart button

v1.18.x
Julian Lam 11 years ago
parent 3f7e458866
commit 7b46d66e68

@ -1,6 +1,6 @@
var fork = require('child_process').fork,
start = function() {
var nbb = fork('./app', process.argv.slice(2), {
nbb = fork('./app', process.argv.slice(2), {
env: {
'NODE_ENV': process.env.NODE_ENV
}
@ -14,6 +14,13 @@ var fork = require('child_process').fork,
nbb.kill();
}
});
}
},
stop = function() {
nbb.kill();
},
nbb;
process.on('SIGINT', stop);
process.on('SIGTERM', stop);
start();

@ -37,7 +37,7 @@ case "$1" in
echo "Launching NodeBB in \"development\" mode."
echo "To run the production build of NodeBB, please use \"forever\"."
echo "More Information: https://github.com/designcreateplay/NodeBB/wiki/How-to-run-NodeBB"
NODE_ENV=development supervisor -q --extensions 'node|js|tpl' -- app "$@"
NODE_ENV=development supervisor -q --extensions 'node|js|tpl' -- loader "$@"
;;
*)

Loading…
Cancel
Save