Skip to main content

Heroku setup for flask application

Project description

Heroku Flask Setup

Run & setup

Linux

$ heroku_flask.sh

Windows

$ heroku_flask.bat

Creating List Of Files

  • Procfile
  • runtime.txt
  • app.py
  • wsgi.py

Procfile

web: gunicorn wsgi:app

runtime.txt

python-3.6.9

app.py

from flask import Flask

app = Flask(__name__)


@app.route("/")
def home_view():
    return "<h1>Welcome to HK World</h1>"

wsgi.py

from app import app

if __name__ == "__main__":
    app.run()

Extra Information

Create Heroku App

Login to heroku CLI using

$ heroku login

Now, Create a unique name for your Web app.

$ heroku create heroku-flask-app

Push your code from local to the heroku remote

$ git push heroku master

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

heroku_flask-0.0.1.tar.gz (1.8 kB view hashes)

Uploaded Source

Built Distribution

heroku_flask-0.0.1-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page