Bitter API
This is a simple Python Flask API for the purposes of the SmartNinja JavaScript course.
Localhost setup
Install Python packages:
pip install -r requirements.txt
If you get an error regarding the psycopg2
, remove it temporarily from the requirements.txt
file, then run the
pip install ...
command again and then return psycopg2
back into the requirements.txt
file.
The
psycopg2
is not needed on localhost. It is only needed on Heroku, where installation goes through without any problem.
Commands for Heroku deployment (for existing Heroku app)
- Heroku login:
heroku login
- Make sure the Git repo is initialized (
git init
) and the files commited (git add .
andgit commit -m "message"
) - Add Heroku remote URL:
heroku git:remote -a enter-heroku-app-name-here
- Push to Heroku:
git push heroku master
(if it doesn work, try to force it:git push heroku master --force
)
Heroku Add-Ons Needed
- Heroku Postgres
- Adminium
- Heroku Redis