Http-server: How do I run http-server in the background

Created on 7 Oct 2015  路  8Comments  路  Source: http-party/http-server

Running:

http-server . &

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

Any other suggestions?

faq

Most helpful comment

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

All 8 comments

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.

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

That or

forever start -c http-server
http-server . > http.log 2>&1 &

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

How do you stop this?

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

@jackdh

See PID with

$ netstat -nlp

After KILL pid

$ kill 999

@jackdh kill the process

Was this page helpful?
0 / 5 - 0 ratings

Related issues

daGaiGuanYu picture daGaiGuanYu  路  5Comments

arthurkhlghatyan picture arthurkhlghatyan  路  3Comments

Altiano picture Altiano  路  7Comments

ghost picture ghost  路  4Comments

asaf picture asaf  路  6Comments