Skip to content

Instantly share code, notes, and snippets.

@yuta1723
Last active May 2, 2017 17:27
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 yuta1723/af2a9b9ebcb5d19b290fe339e900e2a9 to your computer and use it in GitHub Desktop.
Save yuta1723/af2a9b9ebcb5d19b290fe339e900e2a9 to your computer and use it in GitHub Desktop.
from wsgiref import simple_server
def application(env, res):
status = "200 OK"
header = [("Content-type", "text/plain")]
res(status,header)
return ["Hello wsgi application\n"]
if __name__ == "__main__":
sv = simple_server.make_server("", 8080, application) #host , port , application
sv.serve_forever()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment