Search code examples
reactjssubdomainhosting

How do I publish React App on free subdomain?


My React is working fine on localhost.

I created the build folder and uploaded the files in it, to the free subdomain hoster "000webhost". But my App is not working there. Which folder do I have to upload? Or do I need special hosters for react?


Solution

  • To host the app on 000webhost, you have to turn the React app into static HTML/CSS/JS files using a build tool and upload the built HTML/CSS/JS files onto 000webhost. Building the app depends on what tool you're using; e.g. if you're using create-react-app, you can refer to this link: https://create-react-app.dev/docs/production-build/