我是 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/