mars / heroku-cra-node

⚛️ How to use create-react-app with a custom Node server on Heroku
MIT License
927 stars 226 forks source link

"All remaining requests return the React app, so it can handle routing" #26

Closed maulberto3 closed 6 years ago

maulberto3 commented 6 years ago

That line is a comment inside the server's package.json. I want to know what that line means? Are you referring to React Router routing or Express routing?

mars commented 6 years ago

That comment is in server/index.js, and it means that the Express route on the next line will handle all GET requests (that have not already been handled by an Express route above it) with the React app by sending index.html to the browser. Whether or not the React app uses React Router for routing is up to you.

maulberto3 commented 6 years ago

@mars I see, thank you.