duangu9997 2017-07-16 04:50
浏览 40
已采纳

如何将前端应用程序正确部署到GCE?

Here's the problem: I have a web application consisting of frontend part (written in VueJS) and backend part (API service written in Go).

What's the simplest and proper way to deploy such kind of application to GCE? The web application must be able to serve HTTPS.

In AWS world I could deploy frontend part to S3 (which supports HTTPS) and then deploy Go API to ElasticBeanstalk, for example. In GCE world there is Cloud Storage Standard that also supports serving static content (so I can deploy my VueJS part there), but it does not support HTTPS.

There is also Firebase, that supports HTTPS, but the only backend part I can use with that is Google Cloud Functions which means the whole backend part must be reworked.

Any idea what pattern I can use here to solve the problem? Or maybe I'm totally wrong and need to take a different look at it?

  • 写回答

1条回答 默认 最新

  • dongyan9950 2017-07-16 06:30
    关注

    Firebase is the simplest way to deploy your frontend on Google's infrastructure. It handles certificate provisioning for you, so you get HTTPS out of the box. I'm not sure why you think Cloud Functions is the only backend you can use with it. You can use any backend you like, including Amazon's ElasticBeanstalk. I use both App Engine and Compute Engine backends with a Firebase frontend.

    You could also do it the "old way" (how it was done when App Engine was Google's only cloud offering), and deploy your frontend to App Engine; it handles static content just fine.

    There's not a single right way to do it. Your options are vast, and choosing one service to serve your frontend content in no way limits your choice for running your backend.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看