I’m trying to make a function handle all requests to my website. I need this because I’m working on SSR with create-react-app.
My netlify redirect config
[[redirects]] from = "/*" to = "/.netlify/functions/index" status = 200
Every other endpoint besides root (
/) goes through the function.
I was be able to make it works locally by configuring dev to run in different port
[dev] command = "yarn start" port = 3001 publish = "dist"
The feature is under a branch so it can be viewed via deploy-preview
- Go to https://deploy-preview-1--cra-ssr.netlify.app
- Notice the loading indication (Client side rendering)
- Go to React App
- Notice no loading indication (Server side rendering)
Github repository: GitHub - moshfeu/cra-ssr: create-react-app + SSR