python # myapp.py def app(environ, start_response): response_body = b"Hello, World!" status = "200 OK" response_headers = [ ("Content-Type", "text/plain"), ("Content-Length", str(len(response_body))) ] start_response(status, response_headers) return [response_body] # gunicorn.conf.py bind = "0.0.0.0:8000" workers = 4 worker_class = "sync" timeout = 120 $ gunicorn myapp:app -c gunicorn.conf.py


上一篇:
下一篇:
切换中文