Flask WSGI: This is a development server

两种方法:

方法一:

from gevent import pywsgi

if __name__ == ‘__main__’:
server = pywsgi.WSGIServer((‘0.0.0.0’, 5000), app)
server.serve_forever()
方法二:

from wsgiref.simple_server import make_server

if __name__ == ‘__main__’:
server = make_server(”, 64570, app)
server.serve_forever()

Leave a comment