I am working on ReactJS application using create-react-app.
The npm start and npm run build application is working fine, The application is running in a port number like 4000 or pushstate-server build in the port 9000, The problem is that I need to run the build application without port number in a public url like http://sample/home/ , when I browse directly the build/index.html it is showing the home page correctly but the routings is not working as like in port,All of the css and assets are showing not found.
Change the port to 80.
This is the default value for HTTP requests, so, when you try to access
www.google.com
in fact you are accessing
www.google.com:80
You have to serve your app with a webserver instead of Webpack Dev Server, which is a dev tool which is not made for production.
Checkout my answer here for more information: How can I serve a reactjs app through https?