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,
For pm2 if you have created ecosystem.config.js which you should create in the first process according to this official document. By default it will consider development mode and if you want to change then first delete the previous instance with following command.
pm2 delete <ID|APP_NAME|SCRIPT|ALL|JSON>
Then you start the instance with following command.
pm2 start ecosystem.config.js --env production
And to check the process tail the logs of pm2 with following command.
pm2 logs