- Make sure you have pyenv and pipenv installed.
pyenv
will automatically set the required python version when you enter the directory. - Create
.env
file
$ cp .env.example .env
- Create a Spotify app and enter the Client ID and Secret into the
.env
file - Generate a secret key and insert it into the
.env
file. You can use the following code in a python console to retrieve one
import os
os.urandom(24).hex()
- Ensure that you have postgres installed and running on your local machine. If you are using the default
DATABASE_URL
value, you will need to create a postgres user calledadmin
with the passwordadmin
and a database calledmusical_compass
. - Ensure that you have redis-server installed and running on your local machine.
- Install dependencies
$ pipenv install
- Apply database migrations
$ pipenv run flask db upgrade
$ pipenv run gunicorn musical_compass:app