How to deploy the build on Apache WAMP/XAMPP server?
I have an app created with create-react-app
and I have two pages on this application
When I execute yarn start
or npm start
it's working fine and all the pages are rendering properly on the URL navigation or button click
I executed the build command
npm run build
It's generating all the static
and index.html
files on build
folder.
I moved this build folder content to www
of wamp
folder and execute on the url http://localhost
its showing only the home page. and the next page gives 404 not found error
But when I am executing the serve
module of npm command it's working fine on http://localhost:5000
serve build
Please help me how to resolve this?
I have to deploy my application on wamp server all are static pages there is no rest api contents
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…