From f76c54873332a7a0754d7e5aa7349d65a496e356 Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Wed, 23 Oct 2013 12:51:10 +0300 Subject: Deploy with gunicorn --- .gitignore | 1 + Procfile | 2 +- app.py | 2 +- requirements.txt | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0d20b64 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.pyc diff --git a/Procfile b/Procfile index 2e35818..ca6e941 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: python app.py +web: gunicorn app:app diff --git a/app.py b/app.py index 600b380..c9c2965 100644 --- a/app.py +++ b/app.py @@ -12,4 +12,4 @@ class HelloWorld(restful.Resource): api.add_resource(HelloWorld, '/') if __name__ == '__main__': - app.run(port=int(environ.get('PORT', 5000))) + app.run(debug=True) diff --git a/requirements.txt b/requirements.txt index 02b0915..7d944d5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,5 +3,6 @@ Flask-RESTful==0.2.5 Jinja2==2.7.1 MarkupSafe==0.18 Werkzeug==0.9.4 +gunicorn==18.0 itsdangerous==0.23 wsgiref==0.1.2 -- cgit v1.3.1