You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am facing an issue when in production if the urls are entered directly in the browser address bar it returns a 404 error. This is working properly in development. I was using a simple express server for production.
Then i found out that this is happening as the server is not configured to handle the push state.
Then i decided to use pushstate-server to serve the production build according to create-react-app guidelines. Can i use this server as the live server to handle approximately 40 000 unique visits per day.
Thanks and Br,
The text was updated successfully, but these errors were encountered:
Then i found out that this is happening as the server is not configured to handle the push state.
Yes, because you only serve index.html for /. If you want to serve it for all routes, use /* instead. Also I recommend using a static server like Nginx instead of Express for static files. This will scale much better.
Then i decided to use pushstate-server to serve the production build according to create-react-app guidelines.
We do not recommend using pushstate-server in production.
The build output specifically says "serve it locally":
You may also serve it locally with a static server:
Please only use pushstate-server for checking that builds work locally, not for production.
I am facing an issue when in production if the urls are entered directly in the browser address bar it returns a 404 error. This is working properly in development. I was using a simple express server for production.
Then i found out that this is happening as the server is not configured to handle the push state.
Then i decided to use pushstate-server to serve the production build according to create-react-app guidelines. Can i use this server as the live server to handle approximately 40 000 unique visits per day.
Thanks and Br,
The text was updated successfully, but these errors were encountered: