如何使用托管服务器上的Python收听Telegram Webhooks?

发布于 2025-01-23 08:53:05 字数 116 浏览 3 评论 0原文

我有一个托管和一个域名,我想听电报网络钩。 首先,我决定制作一个简单的烧瓶应用程序,以了解烧瓶和请求。但是,当我尝试启动简单的应用程序时,它将部署在Localhost上。您能向我解释如何在外部IP和我的域名上部署它吗?

I've got a hosting, and a domain name, i want to listen to telegram webhooks.
First thing first i decided to make a simple flask application to understand flask and requests. But when i tried to start my simple app it deployed on localhost. Can you explain me how to deploy it on external ip and on my domain name?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

才能让你更想念 2025-01-30 08:53:05

为了做到这一点,您需要使用托管提供商,例如Amazon Web Services(AWS),Google Cloud,Microsoft Azure等。由于您正在托管一个简单的烧瓶应用程序,所以我会预定Heroku来开始。为了将其托管在您的域名上,只需使用域的“ a”记录将域重新路由到服务器的IP地址。我建议开始研究哪些托管提供者是什么,云是其工作原理以及DNS的工作原理,然后尝试托管您的应用程序。我个人使用AWS托管烧瓶应用程序,首先可能很棘手,但是随着时间的流逝,它是一项非常有用的技能,并且随着时间的推移,您可以为全球数百万用户部署超级优化的生产等级应用程序。当您第一次开始学习有关云,DNS等的旅程时,不要感到不知所措,而是保持乐观并继续探索,如果您对互联网有更多疑问,请随时在此网站上发布它:)

In order to do that, you will need to use a hosting provider, like Amazon Web Services (AWS), Google Cloud, Microsoft Azure, etc. Because you are hosting a simple flask app, I would reccomend Heroku to get started. In order to host it on your domain name, simply reroute the domain to the ip address of the server using the "A" record of the domain. I would suggest to start researching what hosting providers are, what the cloud is and how it works, and how dns works, and then try hosting your app. I personally use AWS to host my flask apps, and it can be tricky to start with, but over time it is a very useful skill to have, and overtime with AWS you can deploy ultra-optimized, production grade applications for millions of users worldwide. Don't feel overwhelmed when you first start on this journey learning about the cloud, DNS, and such, instead stay optimistic and keep exploring, and if you have any more questions regarding the internet, feel free to post it on this site :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文