node.js - How to add production mode to sailsjs app when started using PM2 -


to start sailsjs in production mode append --prod.

run: node app.js --prod

i'm using pm2 , simple json file settings, contains name of process , scriptname, kick off node process.

how pass production argument using pm2?

read pm2 json app declaration. e.g. (not tested)

[{   "name"      : "sails",   "script"    : "./app.js",   "args"      : "['--prod']" }] 

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -