python - 通过 python3 http.server 模块设置公共(public) Web 服务器

标签 python http web module python-3.x

我是 python 的新手,也是网络开发的新手。 我在 http.server 模块的帮助下制作了一个 python web 应用程序,并在本地主机端口上运行它。它在 localhost:abcd 上运行良好。

现在我想在一些公共(public)服务器上运行它,比如 pythonanywhere 或 heroku!但是他们不知道服务器地址和端口是什么。

我需要帮助。 提前致谢。

最佳答案

在 PythonAnywhere 上,您会在 your-username.pythonanywhere.com 获得一个在端口 80 上运行的 Web 应用程序——因此您只需键入 http://your-username.pythonanywhere.com/进入您的浏览器 URL 栏以访问它。

关于python - 通过 python3 http.server 模块设置公共(public) Web 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15144072/

相关文章:

Python - 如何使用 python 在 word 文档中嵌入 OLE

python - 使用 Python 解析 XML - 访问元素

C# 上传文件到服务器 - 客户端和服务器端

c - 如何以编程方式从 Web 下载文件?

java - 在vaadin中替换formlayout的单元格

Python - 比较字符串并在它们相等时返回 bool 值

python - 当django模型访问DB时

asp.net-core - Blazor 项目中出现 "No connection could be made because the target machine actively refused it."错误

javascript - YUI 悬停事件淡入淡出

php - 调用函数时带构造函数的类和不带构造函数的类之间的区别?