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

Livereload not exiting after command called #73

Closed
iamdriz opened this issue Mar 9, 2015 · 1 comment · May be fixed by dmitriz/tiny-lr#4
Closed

Livereload not exiting after command called #73

iamdriz opened this issue Mar 9, 2015 · 1 comment · May be fixed by dmitriz/tiny-lr#4

Comments

@iamdriz
Copy link

iamdriz commented Mar 9, 2015

So I have the following in a bat file:

node livereload.js
grunt watch

and my livereload.js file looks like:

var lrserver = require('tiny-lr')();
lrserver.listen(35729, function(err) {
    console.log('LR Server Started');
});

But because the livereload.js doesn't exit after it's run, I don't see any of the console.logs sent from the watch task! If I do it inside the cmd prompt by hand, I have to do CTRL+C to see them (the grunt command is being run, just that the cmd prompt is stuck with _ on the livereload command)

image

Why isn't the server command exiting so I can run another command?

@shama
Copy link
Collaborator

shama commented Mar 9, 2015

Like grunt watch, the server process needs to continue running listening for connections. Thus it will stay open until you tell it to close.

On windows you can tell a process to run in the background with START /B program.

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

Successfully merging a pull request may close this issue.

2 participants