gunicorn/test.py
Benoit Chesneau 21d3f7ccd9 working concurrent version. But I think I will rewrite the worker loop
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
2009-12-03 03:03:47 +01:00

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()