首页 > 解决方案 > 如何配置 Angular 应用程序以便每个人都可以针对后端 GCP​​ 使用它

问题描述

我在 Google Cloud 平台上有这个 Angular Client 应用程序,它也在 GCP 上对 ASP.NET Core 进行 Crud 操作。问题是只有我可以使用该应用程序。

我的朋友使用他的笔记本电脑时,除了我的电脑外,没有人可以连接。

如何配置它,以便每个人都可以使用这个应用程序:

https://angular-v4-dot-unique-yew-244216.appspot.com/#/search

我错过了什么?

在 GCP 的后端日志中,每次我搜索时都会有一个相应的日志条目并且我得到结果,但只有当我从我的开发计算机搜索时

这是我要搜索的数据库:尝试搜索 Title Rain

<?xml version="1.0"?>
<catalog>
  <book id="B1">
    <author>Kutner, Joe</author>
    <title>Deploying with JRuby</title>
    <genre>Computer</genre>
    <price>33.00</price>
    <publish_date>2012-08-15</publish_date>
    <description>Deploying with JRuby is the missing link between enjoying JRuby and using it in the real world to build high-performance, scalable applications.</description>
  </book>
  <book id="B2">
    <author>Ralls, Kim</author>
    <title>Midnight Rain</title>
    <genre>Fantasy</genre>
    <price>5.95</price>
    <publish_date>2000-12-16</publish_date>
    <description>A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.</description>
  </book>
</catalog>

GCP 日志仅在我搜索时显示条目

在此处输入图像描述

标签: angularasp.net-coregoogle-cloud-platform

解决方案


好的,现在可以了!
谷歌云平台有这种流量分割,我有 50% 的 Angular 和 50% 的 ASP.NET 后端。现在我把 90% 放在 ASP.NET 上,10% 放在 Angular 上,是的,它可以工作了!在任何教程中,甚至在部署期间,GCP 都不会对此发出警告......


推荐阅读