I am using angular-fullstack for my application. I want to start my apps using pm2.
Angular-fullstack starts prodcution mode by grunt serve:dist
, it runs several tasks including setting environment variables.
PM2 seems to start an application with a js file. like pm2 start server.js
My question is:
How do I use PM2 to start my application in production mode with Grunt?
I know my main application file is server/app.js
, but I cannot simply do pm2 start server/app.js
, because those environment variables are not properly set.
node ./node_modules/grunt/lib/grunt.js serve
. Thanks your help! – Hash