I have a react project code. I want to deploy it on google cloud. I have a build directory in my project which has builds. Here is my project structure.
How can I deploy it on google cloud. Can someone please guide me. What all files from my project will I have to put there. I am very new to deploying apps online. Will I need to just put the build folder or will I need to upload plete project there?
I have a react project code. I want to deploy it on google cloud. I have a build directory in my project which has builds. Here is my project structure.
How can I deploy it on google cloud. Can someone please guide me. What all files from my project will I have to put there. I am very new to deploying apps online. Will I need to just put the build folder or will I need to upload plete project there?
Share Improve this question asked Jan 9, 2017 at 21:50 EdGEdG 2,3519 gold badges52 silver badges110 bronze badges 1- As far as the files required, just the build output is sufficient. However it depends on how the site is hosted as to if you need additional configuration. I have used Firebase hosting (similar to Google cloud) and hosting a react app is quite simple with that. – Andrew Breen Commented Jan 9, 2017 at 22:38
1 Answer
Reset to default 5React apps are single page applications. Single page applications (SPA) can be hosted as a static website on google cloud storage. Here is the link for hosting a static website on GCP. Similarly, If you want to host reactJS app on AWS S3, here are the steps.
Host the index.html in the root folder of your bucket. Store your bundled react app.js file to sub folders and specify the path in index.html. You can also store other public assets in sub-folder hierarchy.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744370127a4570906.html
评论列表(0条)