1

I'm working with a create-react-app generated app which I'm deploying to Heroku. I would like to test out the production version npm run build in an actual server.

Is it possible to serve the build version instead of the development version to heroku? It's okay if I can no longer have the dev version up in that heroku instance.

If possible, how can I do so, I have been searching up and nothing comes up

1 Answer 1

1

If you're following standard documentation on how to deploy react app to heroku, you're already running the production build on heroku.

That documentation uses create-react-app-buildback for deployment and serving the app via Nginx. You can refer to this section that explains that the app is served from build directory

There is a way to verify this too. If you have react developer tools extension installed on your browser, it shows if the app is running production version or development version.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.