Skip to content

lim-lq/flask-vue-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flask-vue-example

This a web development example.

This project includes api service, front-end and task service using flask, vuejs, celery framework.

Build Setup api

# install python packages
pip install -r requirements.txt
# init db
python manager.py db init
python manager.py db migrate
python manager.py db upgrade
# update db model
python manager.py db migrate
python manager.py db upgrade
# initial privileges
python manager.py init_privilege
# create superuser
python manager.py create_superuser
# run server
python manager.py runserver -h 127.0.0.1 -p 5000

Build vue frontend

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

Run task server

celery -A celery_tasks.celery_ins worker --loglevel=info