我已经开始在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的应用程序文件
^{pr2}$我在运行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)
有人能给我一个简单的例子,教我如何使用女服务员来测试我的猎鹰应用程序吗?在
如果你做一个
from srv3 import api
它似乎可以工作。所以我想应该是这样的:相关问题 更多 >
编程相关推荐