loader now handles arguments and ./nodebb watch command updated to not use loader.

v1.18.x
Julian Lam 11 years ago
parent d6a1fad527
commit b64e5870b7

@ -1,6 +1,6 @@
var fork = require('child_process').fork, var fork = require('child_process').fork,
start = function() { start = function() {
var nbb = fork('./app', [], { var nbb = fork('./app', process.argv.slice(2), {
env: { env: {
'NODE_ENV': process.env.NODE_ENV 'NODE_ENV': process.env.NODE_ENV
} }
@ -8,12 +8,16 @@ var fork = require('child_process').fork,
nbb.on('message', function(cmd) { nbb.on('message', function(cmd) {
if (cmd === 'nodebb:restart') { if (cmd === 'nodebb:restart') {
nbb.on('exit', function() { if (process.env.NODE_ENV !== 'development') {
start(); nbb.on('exit', function() {
}); start();
nbb.kill(); });
nbb.kill();
} else {
console.log('[app] Development Mode is on, restart aborted.');
}
} }
}); });
}; }
start(); start();

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

@ -55,9 +55,7 @@ var DebugRoute = function(app) {
}); });
app.get('/test', function(req, res) { app.get('/test', function(req, res) {
// categories.getModerators(1, function(err, mods) { res.send(200);
// res.json(mods);
// })
}); });
}); });

Loading…
Cancel
Save