我有一个现有的cherrypy 应用程序,但我想知道是否可以在gevent wsgi 服务器上运行它。我想我可以,但我无法访问 linux 服务器来测试 gevent 并且无法让它在我的 mac 上运行。
我的印象是这是可能的,因为每一方都遵循 wsgi 规范。
有没有人试过这个?
我想一个例子如下所示:
import cherrypy
from gevent import wsgi
class Root(object):
def index(self):
return "hi!"
index.exposed = True
app = cherrypy.tree.mount(Root(), '/')
wsgi.WSGIServer(('', 8088), app).serve_forever()