In a production deployment... I ran npm run build, then npm run preview. I'm able to get to the site hosted at port 1234 (default ootb configuration in package.json). I'm able to navigate and go through posts and view an individual posts. But if I were to copy and paste that URL to a different browser, going to that page gives me a 404 not found. If I ran the project with npm run start I can use that same copied and pasted URL, and it would resolve to the proper post.
Is this a flaw with http-server or react-router? Or could it be the npm run build script and how the production code is being built? How would you recommend a local deployment of the production build that would allow for copied and pasted urls to work?
BTW, thanks for sharing the boilerplate, it was a great introduction to Mobx!
In a
production
deployment... I rannpm run build
, thennpm run preview
. I'm able to get to the site hosted at port1234
(default ootb configuration in package.json). I'm able to navigate and go through posts and view an individual posts. But if I were to copy and paste that URL to a different browser, going to that page gives me a 404 not found. If I ran the project withnpm run start
I can use that same copied and pasted URL, and it would resolve to the proper post.Is this a flaw with http-server or react-router? Or could it be the
npm run build
script and how the production code is being built? How would you recommend a local deployment of the production build that would allow for copied and pasted urls to work?BTW, thanks for sharing the boilerplate, it was a great introduction to Mobx!