Running NodeJs http-server forever with PM2

后端 未结 4 1231
灰色年华
灰色年华 2021-02-04 04:18

My question is about running HTTP-server in combination with PM2.

The problem I face is that:

  1. HTTP-server requires as input a folder which is the root of the
4条回答
  •  生来不讨喜
    2021-02-04 04:39

    pm2 start /http-server --name http-server -- -p  -d false
    

    or

    PM2 modules it self has in-build static file to be served, which is similar to http-server https://pm2.keymetrics.io/docs/usage/expose/

    pm2 serve  
    

提交回复
热议问题