mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
loader now handles arguments and ./nodebb watch command updated to not use loader.
This commit is contained in:
@@ -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') {
|
||||||
|
if (process.env.NODE_ENV !== 'development') {
|
||||||
nbb.on('exit', function() {
|
nbb.on('exit', function() {
|
||||||
start();
|
start();
|
||||||
});
|
});
|
||||||
nbb.kill();
|
nbb.kill();
|
||||||
|
} else {
|
||||||
|
console.log('[app] Development Mode is on, restart aborted.');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
start();
|
start();
|
||||||
2
nodebb
2
nodebb
@@ -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);
|
|
||||||
// })
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user