Learning Flask - A course on LinkedIn Learning.
flask playground based on https://www.linkedin.com/learning/learning-flask-2
$ heroku login
heroku: Press any key to open up the browser to login or q to exit:
Opening browser to https://cli-auth.heroku.com/auth/browser/…
Logging in… done
Logged in as…
$ heroku create
Creating app… done, [appname]…
$ heroku addons:create heroku-postgresql:hobby-dev -a [appname]
Creating heroku-postgresql:hobby-dev on [appname]… free
Database has been created and is available
! This database is empty. If upgrading, you can transfer
! data from another database with pg:copy
Created postgresql-something-37746 as DATABASE_URL
Use heroku addons:docs heroku-postgresql to view documentation
$ heroku config -a [appname]
(Save the response info)
$ sudo pip install --upgrade pip
$ sudo pip install virtualenv
In a folder with a .py file and a requirements.txt file, run the following.
$ virtualenv venv
Using base prefix ‘/usr’… Installing setuptools, pip, wheel…
done.
$ source venv/bin/activate
$ pip install -r requirements.txt
$ export FLASK_APP=flask-basic.py
$ flask run