在Google Cloud Bucket上部署angular2 Web应用程序

哈萨迪克

因此,要部署angular2应用程序,我们只需将所有生产文件上传到存储桶即可,如此处所述(部署静态网站)

但是我们如何将所有URL重定向到,index.html以便angular2路由器可以处理它们。我们可以Main Pagewebsite configuration设置但是我们不能指定所有网址都应重定向到index.html

当前Main Page找不到404页面中的结果以外的任何URL

对于亚马逊S3,也类似的问题,但找不到适用于Google Cloud的问题。

哈萨迪克

我通过使用hack解决了这个问题,不知道该怎么做才是正确的方法。但这至少起作用了。

  1. 在中开放存储console.cloud.google.com在此处输入图片说明

  2. 在时段清单中,按一下[编辑网站设定]。单击带有三个点的最右边的行。然后选择edit configuratione 在此处输入图片说明

  3. 输入与404页相同的主页。角度布线将以这种方式很好地工作。在此处输入图片说明

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

使用Google Cloud Platform部署React应用程序

在Google Cloud App Engine上部署闪亮的应用程序会返回错误

在Google Cloud Build上部署NodeJs应用程序时出现问题

使用Cloud SDK测试Flask Web应用程序时出错 本地系统上的Google Cloud

Google Oauth2应用程序类型Web服务器与桌面应用程序?

在Google Cloud App Engine上部署Angular Universal应用时出错

如何将Node.js应用程序部署到Google Cloud?

使用PostgreSQL将Django应用程序部署到Kubernetes Google Cloud集群

如何在Google Cloud Compute Engine中部署Spring Boot应用程序?

Google Cloud SDK 0.9.57版中的gcloud中断了应用程序的部署

Google Cloud Platform应用程序部署导致502服务器错误

将 Node 应用程序部署到 Google Cloud App Service - 如何编辑我的代码?

将C ++应用程序部署到Google Cloud Platform Kubernetes引擎

将带有 textract 模块的 Python 应用程序部署到 Google Cloud Platform

如何在Google Cloud Build上使用env vars部署Vue.js应用程序?

将Flask应用程序部署到Google Cloud Platform时无法获得正确的TensorFlow版本

如何将flask-socketio 应用程序部署到Google Cloud Platform App Engine

部署在 Google Cloud Run 上的 ReactJS 应用程序,加载需要大约 20 秒

将 Nuxt JS SSR 应用程序部署到 Google Cloud App Engine Standard

从部署在Google Cloud App Engine中的Node JS应用程序查询时,Cloud SQL抛出ETIMEDOUT错误

向应用程序的Google Cloud Endpoints 2 API提供API密钥的正确方法是什么?

在 Google App Engine 上部署应用程序时出错

KeystoneJS 应用程序无法在 Google App Engine 上部署

如何在Google App Engine上部署Angular多语言应用程序

如何使用Google Cloud IAM角色使用Google OAuth进行基于角色的Web应用程序控制

如何将Google Cloud App Engine Web应用程序链接到Google Compute Engine VM实例?

在 Google Cloud 上部署 NodeJS、Puppeteer 和 Angular

在Tomcat上部署Web应用程序

无法在Google App Engine上部署应用程序:appengine-web.xml不包含<threadsafe>元素