A barebones Flask app, which can easily be deployed to Heroku.
This is a template repository, you can generate your own from this.
Adapted from heroku/python-getting-started.
Make sure you have Python 3.x installed locally. To push to Heroku, you'll need to install the Heroku CLI.
(See runtime.txt
for the specific Python version. You can change it to your needs)
$ git clone https://github.com/dolugen/flask-starter.git
$ cd flask-starter
$ python3 -m venv env
$ source ./env/bin/activate
$ pip install -r requirements.txt
$ heroku local
Your app should now be running on localhost:5000.
$ pytest tests.py
$ heroku create
$ git push heroku master
$ heroku open
or
For more information about using Python on Heroku, see these Dev Center articles: