Easily configure a performant, secure, and stable NGINX server.Learn More
How to deploy a create-react-SSR-app to a droplet?
Quite a beginner here so I hope my questions aren’t too stupid.
First time using digital ocean, I’ve setup a droplet and followed the steps described in this tutorial: https://coderrocketfuel.com/article/deploy-a-create-react-app-website-to-digitalocean
Great stuff, was excited when I was seeing that spinning react logo. Then I thought I would go a step further and set up a ssr version of it. For my ease of use, I’ve been using the handy create-react-ssr-app to do so. When creating the production build, it gives me a build folder containing two files:
- public (folder) (contains all the basics of a react app with static, app.html etc)
And of course, just copying those files into the nginx html folder does not do the trick, I’m guessing I need to edit the nginx/sites-available/default file so the server goes to the right place? Hope the question is clear enough, essentially, I followed the deploy tutorial, and now would like to do exactly the same but with an ssr react app.
All help is welcome :)
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×