mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
to react on events write/read for sockets so I could have better concurrency. Also i'm not sure that the sleep() is enough. http://www.friendpaste.com/1KVIOzMJGxm0yjv1qprkbf
13 lines
368 B
Python
13 lines
368 B
Python
from gunicorn.httpserver import HTTPServer
|
|
|
|
|
|
def simple_app(environ, start_response):
|
|
"""Simplest possible application object"""
|
|
status = '200 OK'
|
|
response_headers = [('Content-type','text/plain')]
|
|
start_response(status, response_headers)
|
|
return ['Hello world!\n']
|
|
|
|
if __name__ == '__main__':
|
|
server = HTTPServer(simple_app, 4)
|
|
server.run() |