Home
Support Forums

Using prerender.io with a create-react-app

Context: a create-react-app with a Node.js server (attempting server-side rendering). I’m using the below code to try to implement prerender.io. I’m not sure if it is the correct code:
server-side-rendering/server.js at main · mmartinezluis/server-side-rendering · GitHub
I’m also confused on how to use prerender.io; do I need to start the Node js server only, or do I run “npm start” and the node js server simultaneously?

I also wanted to know how does Netlify load my create-react-app. Does it use “react-scripts start” in scripts in the package.json file? Or does it use any other script(s)?

Thank you.

Hi @luism,

To begin with, Netlify doesn’t run any server like you’re trying. We only serve the built files. So, what you’re trying will not work on Netlify. You could try to use Netlify Functions, but they run only for 10 seconds.

We don’t use any scripts to serve. We store the built files on our servers and serve the files from there.