专题文章
时长:00:00更新时间:2020-11-27 14:25:53
一、运行和部署;因为Tornado内置了自己的HTTPServer,运行和部署它与其他Python web框架不太一样。你需要写一个main()函数来启动服务,而不是配置一个WSGI容器来运行你的应用。def main(): app = make_app() app.listen(8888) IOLoop.current().start()if __name__ == ';__main__';: main()。
查看详情