sudo npm i -g forever http-server
Copy startServer.js
to /usr/lib/startServer.js
-
Copy content of
http-server
in/etc/init.d/http-server
-
Make the service executable & add it to boot
sudo chmod +x /etc/init.d/http-server
sudo update-rc.d http-server defaults 80