diff --git a/loader.js b/loader.js index 21fb5d0c8c..d8393c55f7 100644 --- a/loader.js +++ b/loader.js @@ -1,6 +1,6 @@ var fork = require('child_process').fork, start = function() { - var nbb = fork('./app', [], { + var nbb = fork('./app', process.argv.slice(2), { env: { 'NODE_ENV': process.env.NODE_ENV } @@ -8,12 +8,16 @@ var fork = require('child_process').fork, nbb.on('message', function(cmd) { if (cmd === 'nodebb:restart') { - nbb.on('exit', function() { - start(); - }); - nbb.kill(); + if (process.env.NODE_ENV !== 'development') { + nbb.on('exit', function() { + start(); + }); + nbb.kill(); + } else { + console.log('[app] Development Mode is on, restart aborted.'); + } } }); - }; + } start(); \ No newline at end of file diff --git a/nodebb b/nodebb index 0ea67b0a69..cdefacd524 100755 --- a/nodebb +++ b/nodebb @@ -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' -- loader "$@" + NODE_ENV=development supervisor -q --extensions 'node|js|tpl' -- app "$@" ;; *) diff --git a/src/routes/debug.js b/src/routes/debug.js index 7d877c8724..cca3f359de 100644 --- a/src/routes/debug.js +++ b/src/routes/debug.js @@ -55,9 +55,7 @@ var DebugRoute = function(app) { }); app.get('/test', function(req, res) { - // categories.getModerators(1, function(err, mods) { - // res.json(mods); - // }) + res.send(200); }); });