From 3c33eea7963a9d2886fc84501ae85e0564fe3fe4 Mon Sep 17 00:00:00 2001 From: Ian Andwati Date: Sun, 15 May 2022 19:21:41 +0300 Subject: [PATCH] gunicorn server --- Procfile | 2 +- wsgi.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 wsgi.py diff --git a/Procfile b/Procfile index 5c18dec..fc272ab 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: python -m src.server $PORT \ No newline at end of file +web: gunicorn wsgi:app \ No newline at end of file diff --git a/wsgi.py b/wsgi.py new file mode 100644 index 0000000..217ab4a --- /dev/null +++ b/wsgi.py @@ -0,0 +1,7 @@ +import os + +from src.server import app + +if __name__ == "__main__": + port = int(os.environ.get("PORT", 33507)) + app.run(host="0.0.0.0", port=port)