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-server. Best solution so far is to install http-server locally via npm and run something like this: forever start ./node_modules/http-server/bin/http-server
. But in this case I can't set port and other options. What's the best practice?
You can set the options using that code. Just use the available flags after the end of your command. For example:
forever start ./node_modules/http-server/bin/http-server -p 80 -d false
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With