pip install fapws3
python
import fapws._evwsgi as evwsgi
from fapws import base
def hello_app(environ, start_response):
status = '200 OK'
headers = [('Content-type', 'text/plain')]
start_response(status, headers)
return ['Hello, World!']
wsgi_handler = evwsgi.WsgiHandler()
wsgi_handler.add_route('/', hello_app)
wsgi_handler.set_bind_addr(('localhost', 8000))
evwsgi.start()
evwsgi.run()
python
evwsgi.set_thread_pool(10)
python
wsgi_handler.set_bind_addr(('0.0.0.0', 8080))