Skip to content

Latest commit

 

History

History
54 lines (35 loc) · 831 Bytes

README.md

File metadata and controls

54 lines (35 loc) · 831 Bytes

Intro to Frameworks & Database

Demo app done in Flask for the "Coding For Product: Intro to Frameworks & Database" lecture.

Setup

Requirements: Anaconda Python 3, Postgres, pip

  1. clone repo

  2. activate a virtual environment

conda python

$ conda create --name cfp_flask flask

# Mac
$ source activate cfp_flask

# Windows
$ activate cfp_demo_flask
  1. install packages
(cfp_flask) $ pip install -r requirements
  1. create database
(cfp_flask) $ createdb <database_name>
  1. set up enviroment variables
  • copy .env.sample, and rename it .env
  • fill in the DATABASE_URI
  1. run migrations
(cfp_flask) $ python manage.py db upgrade
  1. run seed data to populate database
(cfp_flask) $ python manage.py seed

Start application

(cfp_flask) $ python3 app.py