#Method One using Github Repository
- Clone this repository.
# Clone this repo
git clone https://github.com/mkleong96/flask_todo_list_app
cd flask_todo_list_app
- Create virtual environment and install dependencies.
# Conda create venv
conda create --name flask_env python=3.9.7
pip install -r requirements.txt
- Activate venv and run the server.
# Conda activate venv
conda activate flask_env
flask run --cert=adhoc #to make sure the app running using https protocol
#Method Two using Docker
- Clone this repository.
# Clone this repo and cd to the directory
git clone https://github.com/mkleong96/flask_todo_list_app
cd flask_todo_list_app
-
Important: Make sure Docker is running!
-
Build using Docker-Compose
docker-compose build
- Run the app using Docker-Compose Up
docker-compose up
- To login to the app
curl -k https://127.0.0.1:5000/login/github
Then, copy the link and open in browser to login
- To Show the all To-Do List added
curl -k https://127.0.0.1:5000/list_all
- To Add New To-Do List
curl -k -H "Content-Type: application/json" -X POST -d "{\"title\":\"Read a book\", \"description\":\"Read a book on Monday\", \"status\":\"not complete\" }" https://127.0.0.1:5000/add_to_do_list
- To Delete a To-Do List
curl -k -H "Content-Type: application/json" -X POST -d "{\"id\":\"3\"}" https://127.0.0.1:5000/delete_list
- To Mark a To-Do List Complete
curl -k -H "Content-Type: application/json" -X POST -d "{\"id\":\"3\" ,\"status\":\"done\"}" https://127.0.0.1:5000/mark_list_done
- To upload a Image
curl -k -F file=@/filepath/ https://127.0.0.1:5000/add_img
Final list after adding/remove/update:
- API for Login with GitHub Account.
- API for checking authentication.
- API for list all To-Do-List.
- API for adding a new To-Do-List.
- API for delete a To-Do-List.
- API for marking a To-Do-List complete.