Deploy node app with http-server and forever

前端 未结 5 1241
生来不讨喜
生来不讨喜 2021-02-06 12:01

I want to use http-server and forever.js to deploy my app to remote ubuntu server. But forever.js requires path to JS file, not to executable. So I can\'t pass keys to http-serv

5条回答
  •  攒了一身酷
    2021-02-06 12:45

    Browse to your directory that contains your files And from the command line type: forever start -c http-server . -p your_port_number Example: forever start -c http-server -p 8000

    In this way, the port 8000 will forever point to the html files in your directory.

提交回复
热议问题