Advertisement
ABIX_Edukacja

wsgi_version1

Apr 24th, 2019
363
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. import wsgiserver
  2.  
  3. def application(environ, start_response):
  4.     body_byte = b'Hello world!\n'
  5.     status = '200 OK'
  6.     headers = [('Content-type', 'text/plain')]
  7.     start_response(status, headers)
  8.     return [body_byte]
  9.  
  10.  
  11. server = wsgiserver.WSGIServer(application)
  12. server.start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement