I am using grunt task-runner in nodejs application.
I want to run another grunt task only after the server started by nodemon is listening to a port. Please note that i can't run the tasks concurrently (because i don't know in how much time server will start listening), so grunt-concurrent didn't helped.
How could i do that.?
I have the following task config with grunt-nodemon:
nodemon: {
dev: {
script: 'server.js',
options: {
// options ..
callback : function(nodemon){
nodemon.on('config:update',function(){
console.log('reached here .. '); // this get consoled on screen
grunt.task.run('mynewtask');
});
},
// options ...
}
},
exec: {
options: {
exec: 'less'
}
}
}
```javascript
But nothing happens after server start listening. mynewtask does not start at all. Not even any error is shown.
I am using grunt task-runner in nodejs application.
I want to run another grunt task only after the server started by nodemon is listening to a port. Please note that i can't run the tasks concurrently (because i don't know in how much time server will start listening), so grunt-concurrent didn't helped.
How could i do that.?
I have the following task config with grunt-nodemon: