How to deploy mern-starter to heroku in production?

2Responses

Write your response…

Write a reply...

Hi, shawn! By default, Heroku has the production flag set to true on NodeJS projects, which results in the installation of the production dependencies only. If you would also like to install devDependencies, you can either set the corresponding production flag to false...

$ heroku config:set NPM_CONFIG_PRODUCTION=false

...or optionally, move all of your npm devDependencies to dependencies; as is recommended in the story which Sandeep shared in his answer. Please do give it a complete read for a quick checklist of things to do, to get the MERN boilerplate deployed to Heroku.

Write a reply...

Hashnode is a place to share and grow your programming knowledge

  • 🖥Pick the technologies you like & read great content through your feed.
  • 💬Ask a question when you want to learn more about anything.
  • 🚀Share what you know & build your portfolio.
Get startedLearn more

loading ...