Skip to content

Instantly share code, notes, and snippets.

@rafaelsq
Created December 17, 2019 13:40
Show Gist options
  • Save rafaelsq/33f3cd9290c1d0db1b370f51055c653f to your computer and use it in GitHub Desktop.
Save rafaelsq/33f3cd9290c1d0db1b370f51055c653f to your computer and use it in GitHub Desktop.
Hello Word with Gunicorn
def app(environ, start_response):
data = bytes("<!DOCTYPE html>\nOlá\n", 'utf-8')
start_response("200 OK", [
["Content-Type", "text/html; charset=utf-8"],
["Content-Length", str(len(data))],
])
return iter([data])
@rafaelsq
Copy link
Author

$ virtualenv env
$ source env/bin/activate
$ > pip install gunicorn
$  venv/bin/gunicorn --reload app:app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment