Skip to content

mkleong96/flask_todo_list_app

Repository files navigation

Instruction for building the app

#Method One using Github Repository

  1. Clone this repository.
# Clone this repo
git clone https://github.com/mkleong96/flask_todo_list_app
cd flask_todo_list_app
  1. Create virtual environment and install dependencies.
# Conda create venv
conda create --name flask_env python=3.9.7
pip install -r requirements.txt
  1. 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

  1. 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
  1. Important: Make sure Docker is running!

  2. Build using Docker-Compose

docker-compose build
  1. Run the app using Docker-Compose Up
docker-compose up

image

Instruction for running the app

  1. To login to the app
curl -k https://127.0.0.1:5000/login/github

image Then, copy the link and open in browser to login

image

image

image

  1. To Show the all To-Do List added
curl -k https://127.0.0.1:5000/list_all

Example output: image

  1. 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

Example output: image

  1. 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

Example output: image

  1. 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

Example output: image

  1. To upload a Image
curl -k -F file=@/filepath/ https://127.0.0.1:5000/add_img

Final list after adding/remove/update: image

Interface documentation.

  1. API for Login with GitHub Account.

image

  1. API for checking authentication.

image

  1. API for list all To-Do-List.

image

  1. API for adding a new To-Do-List.

image

  1. API for delete a To-Do-List.

image

  1. API for marking a To-Do-List complete.

image

About

to do list app using flask

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published