For local development execute npm serve in ../frontend/ as well as backend-live.sh to expose port 80
After changes to the database model do
$ flask db migrate -m 'migration message'
$ flask db upgrade
If there are any errors, try to reset the current head
$ flask db stamp head
Local development for entering flask shell:
$ cd app $ export FLASK_APP=backend.py $ export FLASK_ENV=development $ flask shell
To add a team with user and role in flask shell do
team1 = Team(name='team1') susan = User(name='susan', team=team1, role=Role(name='Project Manager')) tim = User(name='tim', team=team1, role=Role(name='Function Designer')) team1.set_password('mypassword') db.session.add(team1) db.session.commit() User.query.first() Team.query.all() Role.query.filter_by(name='Project Manager').first()