Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to start another task after the nodemon server is listening? #60

Open
codeofnode opened this issue Jul 31, 2015 · 2 comments
Open

Comments

@codeofnode
Copy link

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.
@MarkusPint
Copy link

+1

@stephanembl
Copy link

Any updates on this? If I put a non-existing task, it fails, but when I put an existing one it doesn't seem to be doing anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants