Windows OS 上的女服务员猎鹰

Falcon through Waitress on Windows OS

我已经开始在 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()

我在 运行ning 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)

谁能告诉我一个关于如何使用女服务员测试我的 falcon 应用程序的简单示例?

如果您执行 from srv3 import api 它似乎有效。所以我认为它应该是这样的:

from srv3 import api
from waitress import serve

serve(api, host='127.0.0.1', port=5555) # it is the same if i use serve(srv3)