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 do I run http-server in the background #189

Closed
EvHaus opened this issue Oct 7, 2015 · 10 comments
Closed

How do I run http-server in the background #189

EvHaus opened this issue Oct 7, 2015 · 10 comments

Comments

@EvHaus
Copy link

EvHaus commented Oct 7, 2015

Running:

http-server . &

Doesn't seem to work. It also doesn't play nice with forever or supervisor.

Any other suggestions?

@derhuerst
Copy link

For me, http-server . & works. I just have to press enter once more to get my prompt back. :P

I'm having trouble installing forever right now, but i will let you know if it works for me.

@derhuerst
Copy link

forever start $(which http-server) . works as well for me.

@indexzero
Copy link
Collaborator

That or

forever start -c http-server

@indexzero indexzero added the faq label Oct 7, 2015
@ksloan
Copy link

ksloan commented Mar 31, 2016

http-server . > http.log 2>&1 &

@jackdh
Copy link

jackdh commented Jan 14, 2019

http-server . > http.log 2>&1 &

How do you stop this?

@deepakppatil
Copy link

http-server . > http.log 2>&1 &
echo $! > /var/tmp/pidfile
pkill --pidfile /var/tmp/pidfile

@andradedpg
Copy link

@jackdh

See PID with

$ netstat -nlp

After KILL pid

$ kill 999

@plh97
Copy link

plh97 commented Aug 26, 2020

@jackdh kill the process

@simonsmith
Copy link

For those still stuck from Google:

https://stackoverflow.com/questions/47881223/running-http-server-in-background-from-an-npm-script

npm-run-all with --race works best

@luckydevboy
Copy link

nohup http-server . &

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

10 participants