hmaxx
hmaxx

Reputation: 657

How to build react app for production without making the website offline?

Is it possible to build react app for production using npm run build without it making the site offline? I am using nginx to serve the react app and when I run the above command, I get Internal server error until the build is finished. It would be nice if the old version of the app is served until the build is finished.

Upvotes: 1

Views: 662

Answers (1)

Matthew Daly
Matthew Daly

Reputation: 9476

You shouldn't be building your application on the production server. Build it locally, then deploy it to production and this won't be an issue.

Upvotes: 3

Related Questions