Skip to content

Instantly share code, notes, and snippets.

@mopemope
Created October 7, 2010 08:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mopemope/614769 to your computer and use it in GitHub Desktop.
Save mopemope/614769 to your computer and use it in GitHub Desktop.
from meinheld import server
def hello_world(environ, start_response):
status = '200 OK'
res = "Hello world!"
response_headers = [('Content-type','text/plain')]
start_response(status, response_headers)
print environ
print environ["QUERY_STRING"]
return [res]
server.listen(("0.0.0.0", 8001))
server.run(hello_world)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment