How to add production mode to sailsjs app when started using PM2

后端 未结 7 1977
心在旅途
心在旅途 2021-01-13 06:57

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,

7条回答
  •  再見小時候
    2021-01-13 07:25

    Read PM2 JSON app declaration. E.g. (not tested)

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

提交回复
热议问题