NODE_ENV = production #28
-
Hello, I see in a couple of your Docker examples you include NODE_ENV = production, but don't mention it specifically in any guide. Back in the day at least Express needed NODE_ENV = production to improve performance - https://www.dynatrace.com/news/blog/the-drastic-effects-of-omitting-node-env-in-your-express-js-applications/. Express hasn't seen any updates for a while and this is still in its guide for production. Is this still recommended to include in your Dockerfile and could be added to the guide specifically, or is this outdated now? Or I guess I mean to say, should we be including this every time for production in Dockerfiles? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It doesn't hurt to add it, but be aware that it can affect npm/yarn so you'll need to change it to development in stages that build dev/test environments. |
Beta Was this translation helpful? Give feedback.
It doesn't hurt to add it, but be aware that it can affect npm/yarn so you'll need to change it to development in stages that build dev/test environments.