Comes with preconfigured basic Flask app with SQLAlchmemy, LoginForm, Basic User Model, and static assets.
- Python 2.7.x
node
with global installation ofgulp
andbower
. Can be used without that global installations also.
- Clone this repo
git clone [email protected]:brijeshb42/flask-web-starter-kit.git
. - Create a new virtual environment
mkvirtualenv starter-kit
. - Switch to the new env
workon starter-kit
. - Install python modules
pip install -r requirements.txt
. - Install node modules to compile assets
npm install
. - Install bower packages
bower install
. - Copy
config.py.default
toconfig.py
. - Make changes to
config.py
as required. - Create a symlink to
bower_components
folder insidefrontend
:cd frontend && ln -s ../bower_components/ bower_components
. - Migrate DB (uses sqlite by default. Can be configured in
config.py
)python script.py db init
python script.py db migrate
python script.py db upgrade
- In separate terminal,
cd
into thestarter-kit
directory and rungulp clean && gulp
to compile static assets and start a livereload server. - Then run
python script.py runserver
- Open
localhost:5000
in browser. - To add your own routes, open
backend/app.py
and start adding your own urls and responses. You can spin off your routes in new files. Just don't forget to import your files inapp.py
.