Deploy node app with http-server and forever

前端 未结 5 1259
生来不讨喜
生来不讨喜 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:48

    This worked with me

    First get path of http-server like this

    which http-server
    

    for example you will get "/usr/bin/http-server"

    then after that write the forever followed by http-server path and your app path

    forever start /usr/bin/http-server /your/app/path
    

    Best regards.

提交回复
热议问题