【发布时间】:2016-06-14 04:15:18
【问题描述】:
我已经开始在 Ubuntu 上使用 Falcon 制作 API,我一直在使用 gunicorn 对其进行测试,但我也想尝试在 Windows 上开发它。
我们知道 gunicorn 还不能在 Windows 上运行,所以我将不得不使用另一个可以运行 wsgi 的服务器。经过一些研究,我尝试使用女服务员,但事情并没有像我想象的那样工作。
问题是,我不知道我做错了什么。
import srv3
from waitress import serve
serve(srv3, host='127.0.0.1', port=5555) # it is the same if i use serve(srv3)
这是名为 srv3 的应用文件
import falcon
api = application = falcon.API()
运行http localhost:5555时出现此错误
HTTP/1.1 500 Internal Server Error
Content-Length: 110
Content-Type: text/plain
Date: Tue, 01 Mar 2016 16:34:45 GMT
Server: waitress
Internal Server Error
The server encountered an unexpected internal server error
(generated by waitress)
谁能给我看一个关于如何使用女服务员测试我的猎鹰应用程序的快速示例?
【问题讨论】:
-
感谢它在 Windows 上运行
标签: python wsgi waitress falcon