If you're new to Flask and SQLAlchemy: Flask: http://flask.pocoo.org/ SQLAlchemy: http://flask-sqlalchemy.pocoo.org/2.1/
Getting started:
-
clone the repo and cd to it
-
run
virtualenv venv && source venv/bin/activate
(You will need to source the activate script for other new shells as well) -
pip install -r requirements.txt
-
npm install -g create-react-app
-
cd frontend && npm install && cd ..
-
npm install && npm install -g gulp-cli
-
npm run postinstall
-
python run.py
-
Go to http://localhost:5000/
-
Go to the Wildflower Network, then Admin -> School Settings.
-
In the Custom Header box, put the following:
<script>window.sensei = {env: {baseUrl: 'http://localhost:5000'}}</script>
<script src="http://localhost:3002/static/bundle.js"></script>
<link rel="stylesheet" type="text/css" href="http://localhost:3002/static/bundle.css">
env $(cat .sim.env | xargs) ./classroom_sim.py
-
export FLASK_APP=run.py
-
flask db upgrade
pytest
Or to just run tests that match a string:
pytest -k somestring
We use two buildpacks; one for python, one for nodejs
heroku buildpacks:add --index 1 heroku/python
heroku buildpacks:add --index 2 heroku/nodejs