Skip to content

Instantly share code, notes, and snippets.

@knotech
Created August 11, 2014 10:17
Show Gist options
  • Save knotech/272ef3ef69c401db6b55 to your computer and use it in GitHub Desktop.
Save knotech/272ef3ef69c401db6b55 to your computer and use it in GitHub Desktop.
Flask starter script.
#!/bin/bash
## flask up
## create virtualenv virtual environment, install flask, and cp boilerplate
## into virtual environment.
##
## run: ~$ . flaskup <dirname>
if [[ -z $1 ]];
then
echo "Usage: flaskup [dirname]";
exit
else
virtualenv $1 &&
cd $1 &&
source bin/activate &&
mkdir ./app &&
cp -r ~/templates/flask-boilerplate-master/* ./app/ &&
bin/pip install -r app/requirements.txt &&
bin/python app/app.py
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment