DEV Community

Discussion on: How to deploy a Webapp to Heroku (Node.js, React.js and MongoDB)

Collapse
 
dhowe profile image
Daniel Howe

Nice article. What is the point of the NPM_CONFIG_PRODUCTION flag, and when does it get set to true?

Collapse
 
pacheco profile image
Thiago Pacheco

Thank you, Daniel.

The NPM_CONFIG_PRODUCTION is used in case you need access to packages declared under devDependencies in a different buildpack or at runtime.
Then when your app is ready for production it is better to set it to true.