Launch two script
FlorianBELLAZOUZ opened this issue · comments
Hi !
How can I launch multiple nodemon process ?
When i do :
grunt.config('nodemon.hub.script','dev/serv/extend/deploy/deploy.js');
grunt.task.run('nodemon:hub');
grunt.config('nodemon.game.script','dev/serv/game/game.js');
grunt.task.run('nodemon:game');
with this standar config :
nodemon: {
hub: {
script: "none",
delay:50,
options: {
nodeArgs: ['--debug'],
callback: function (nodemon) {
nodemon.on('log', function (event) {
console.log(event.colour);
});
nodemon.on('restart', function () {
setTimeout(function() {
require('fs').writeFileSync('.rebooted', 'rebooted');
}, 100);
});
},
watch: ['./dev/serv/']
}
},
game:{
script: "none",
delay:50,
options: {
nodeArgs: ['--debug'],
callback: function (nodemon) {
nodemon.on('log', function (event) {
console.log(event.colour);
});
nodemon.on('restart', function () {
setTimeout(function() {
require('fs').writeFileSync('.rebooted', 'rebooted');
}, 100);
});
},
watch: ['./dev/serv/']
}
}
}
grunt launch only the first script :
Running "nodemon:hub" (nodemon) task
Node Inspector v0.7.4
Visit http://127.0.0.1:1333/debug?port=5858 to start debugging.
[nodemon] v1.2.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: C:\Users\florian\Desktop\work\dev\serv/**/*
[nodemon] starting `node --debug dev/serv/extend/deploy/deploy.js`
debugger listening on port 5858
This is because the long-running task is blocking the terminal from further commands. Try using grunt-concurrent and run nodemon:hub
and nodemon:game
at the same time.
Ho OK ! Sorry and thanks for the reply !