Phase I build a in memo api server and finish to-do list function
Phase II integrate with SQLITE
- use flask-migrate to manage the db migrate, upgrade which is a impl of Alembic
- has write the script to do db action
- usage of alembic db management *. when first time run, use: python manage_db.py db init *. python manage_db.py db migrate --message 'some message you want' *. python manage_db.py db upgrade, then the db schema will be changed *. python manage_db.py db history, to check the change history *. when OS is windows, mirgate with --message will be failed
- SQLITE is not support the rename of column, so I have to do this db change manually
- cause I used key word 'desc' as column name, so it gives a comma wrap to it
usage of Coverage.py
- coverage run test.py | this command finish the data collect
- coverage report | this command show the coverage rate in CLI
- coverage html -d covhtml | generate a html format report
- in above way, the report will include third-party lib, use --source or --omi to workaround it
- coverage run --source ./project test_view.py
Phase III deploy to server
- integrate with docker
- flask + docker
- nginx + docker
- nginx + uWSGI learning
- simple demo of deploy to server
##TODO LIST
- apache or nginx
- migrate to docker
- build status, once check in to git, give a feed back
*. get tasks: curl http://localhost:5000/todo/api/v1/tasks *. post tasks: curl -i -H "Content-Type: application/json" -X POST -d '{"title":"Read a book"}' http://localhost:5000/todo/api/v1/tasks *. post tasks: curl -i -H "Content-Type: application/json" -X PUT -d '{"title":"Read a book02", "id":1}' http://localhost:5000/todo/api/v1/tasks