To start sailsjs in production mode you append --prod
.
Run:
node app.js --prod
I'm using PM2 and a simple json file for settings, which contains name of process and scriptname, to kick off the node process.
How would I pass the production argument using PM2?
Read PM2 JSON app declaration. E.g. (not tested)
[{
"name" : "Sails",
"script" : "./app.js",
"args" : "['--prod']"
}]
first delete:
pm2 delete app
again:
pm2 start app.js -x -- --prod
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