My question is about running HTTP-server in combination with PM2.
The problem i face is that:
/node_modules/http-server/lib$ pm2 start http-server.js -- /home/unixuser/websiteroot -p8686
http-server /home/unixuser/websiteroot -p8686
You almost had it.
Check where http-server is located by executing:
$ which http-server
You should get something like this
cd to the directory you want to serve files from and execute:
$ pm2 start /usr/bin/http-server --name my-file-server -- -p 8080 -d false
--name my-file-server is optional, but
-- is required to pass arguments through to the