javascript - Deploying react app in google cloud - Stack Overflow

I have a react project code. I want to deploy it on google cloud. I have a build directory in my projec

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
Add a ment  | 

1 Answer 1

Reset to default 5

React 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

相关推荐

  • javascript - Deploying react app in google cloud - Stack Overflow

    I have a react project code. I want to deploy it on google cloud. I have a build directory in my projec

    7天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信