Flask backend API for the foodplanner application
Environment variables available for configuration:
MAIL_USERNAME="[email protected]"
MAIL_PASSWORD="smtp_password"
MAIL_SERVER="smtp.yourdomain.com"
MAIL_DEFAULT_SENDER="[email protected]"
DATABASE_URL="postgresql://pg_user:pg_password@pg_host/pg_database"
SECRET_KEY="randomsecretkey"
SECURITY_PASSWORD_SALT="randomsalt"
note: DATABASE_URL can be left out if you want to use a SQLite database, but this isn't recommended - because we don't support cascading deletes in SQLite so you will end up with orphans in your database when deleting their parents.
-
Install requirements with
pip install -r requirements.txt
-
Run database migration with
alembic upgrade head
-
Run the application with
python foodlist.py
, or build it using the Dockerfile.
python -m unittest discover tests/ -v
coverage run -m unittest discover tests/
To create a nice html report run coverage html