Skip to content

n0thingness/cs446-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
Mar 20, 2018
Mar 31, 2018
Mar 20, 2018
Mar 23, 2018
Mar 20, 2018
Apr 1, 2018
Mar 20, 2018
Mar 27, 2018
Mar 23, 2018
Mar 20, 2018
Mar 20, 2018
Mar 31, 2018

Repository files navigation

cs446-api

Remember to install autoenv outside of your virtual env

Create a .env file in root directory

Add following info:

source env/Scripts/activate
export APP_SETTINGS="config.DevelopmentConfig"
export DATABASE_URL="postgresql://postgres:DB_PASSWORD@localhost/DB_NAME"

Be sure to modify the first line to suit your system appropriately, currently it is for the Windows implementation of virtual env

Code for migrating database:

python manage.py db init
python manage.py db migrate
python manage.py db upgrade

First line is for initializing migrations folder (run once)

Second line is for creating a new migration to update the db model (run when model is changed)

Third line is for upgrading the db to the latest migration (run when model is changed, after having created the new migration file)

To run the server locally

python app.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published