我的默认应用程序是否必须部署到appspot.com? [英] Does my default app have to be deployed to appspot.com?

查看:128
本文介绍了我的默认应用程序是否必须部署到appspot.com?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我问了一个关于默认应用程序的问题,因为它与应用程序引擎上的微服务相关,并得到了很好的回应 here ,但我还有一个与此有关的问题。

I asked a question about the default app as it related to microservices on app engine and got a great response here, but I have another question relating to this.

我的默认应用程序必须通过appspot.com访问吗?当我运行部署命令时,它把它放在哪里,但我宁愿让它不能像那样访问。我真的只想要一个满足默认应用程序要求的半空(如hello世界大小)的应用程序。

Does my default app have to be accessible via appspot.com? when i run the deploy command thats where it puts it, but I'd rather have it not accessible like that. I really just want a semi-empty (like hello world sized) app that satisfies the default app requirement.

看起来谷歌似乎是将多应用程序/微服务这个环境最初设置为仅供其他模块支持的单个面向Web的应用程序提供服务。这看起来非常不合情理,而且很无礼。

It does seem like google is shoehorning multi-app/microservices into an environment that was originally setup to only serve a single web facing app backed by other modules. It seems very ungraceful and hacky.

推荐答案

您可以根据使用的网址自定义您的应用程序以执行不同的操作。

You can customize your app to perform differently based on the URL that was used.

例如,您可以使用具有webapp2的域特定路由,或者您可以通过检查 self.request.url 的值并相应地作出响应来检查处理程序中的域。

For example, you can use domain specific routes with webapp2 or you can check the domain in your handler by checking the value of self.request.url and responding accordingly.

例如,您可以让myapp.appspot.com返回404,但有www.mydomain.com向用户提供内容。

You could for example, have myapp.appspot.com return a 404 but have www.mydomain.com provide content to users.

这篇关于我的默认应用程序是否必须部署到appspot.com?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆