From b7cf2edfd36198ea6fcc6a8006e9ff1c30749552 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 26 Oct 2018 09:19:47 +0100 Subject: [PATCH] Always use waitress to serve --- Pipfile | 2 +- Procfile | 2 +- app/server.py | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Pipfile b/Pipfile index 0f14507..5fa5448 100644 --- a/Pipfile +++ b/Pipfile @@ -19,7 +19,7 @@ mypy = "*" python_version = "3.7" [scripts] -start = "python3 app/server.py" +start = "waitress-serve app.server:app" test-fix = "bash ./scripts/test-fix.sh" test = "bash ./scripts/test.sh" diff --git a/Procfile b/Procfile index d09b9a5..0bfa39f 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: waitress-serve --port $PORT app.server:app +web: pipenv run start --port $PORT diff --git a/app/server.py b/app/server.py index b31c277..33413c8 100644 --- a/app/server.py +++ b/app/server.py @@ -15,7 +15,3 @@ webhook = Webhook(app, secret=config.GITHUB_WEBHOOK_SECRET) @webhook.hook(event_type="ping") def ping(data): return abort(jsonify({"ping": "pong"})) - - -if __name__ == "__main__": - app.run(host="0.0.0.0")