A
A
account-42017-03-10 17:37:01
JavaScript
account-4, 2017-03-10 17:37:01

Why does pm2 run application in Development mode?

Using https://github.com/nuxt/express
When I run npm start the app works as expected in Production.
But when I try to run via pm2 - the application works in Development (FOUC is noticeable, which should not be in production, i.e. styles are not included in html).
Why is that? Do I need to set up pm2 separately so that it starts the process in Production? Or is it an application problem (but without pm2 it works as expected).
I run the command `pm2 start server.prod.js`
Application script that works as expected without pm2: "start": "cross-env NODE_ENV=production node server.prod.js"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton, 2017-03-10
@SPAHI4

Try creating config pm2.keymetrics.io/docs/usage/application-declarati...

S
scrpcc1, 2017-03-11
@scrpcc1

I run like this
NODE_ENV=production pm2 start server.prod.js -n APP NAME

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question