I need to run the server like I simply do with:
npm run start
but I need to use the production mode. Is this possible?
In ember or angular it is possible. How to do in create-react-app
?
I tried npm run start --prod
but nothing.
The best option is probably to do a normal production build and then run it locally.
First install an HTTP server:
npm install serve -g
Then:
npm run build
serve -s build
By default, it will run on port 5000 so your local URL is http://localhost:5000