-
Install dependencies:
pip install -r requirement.txt
-
Set environment variables:
export FLASK_APP='backend2.py' export FLASK_APP='development' export DATABASE_URL="postgresql://<USER>:<PASSWORD>@localhost/backend2test"
-
Initialise database:
Database needs to be created before running the migration scripts. As postgres does not create a database if the database with given name doesn't exist.flask db init flask db migrate flask db upgrade
As migrations are already part of the repository, there is no need for
flask db init
andflask db migrate
. -
Run flask's development server
flask run
Testing will require that the environment variable FLASK_APP=backend2.py is properly set. Testing will be done in an in-memory database, so no need to specify DATABASE_URL for that. Use flask test
to run tests.
- - Add tests for start, stop.
- - Deploy on cloud for remote usage
- - Add API Documentation