/todoly

Primary LanguageJava

Todoly

Todoly is a task organizer

Build

For local

./gradlew bootBuildImage --imageName=todoly:latest 

For production

./gradlew bootBuildImage --imageName=962253134326.dkr.ecr.us-east-1.amazonaws.com/todoly:0.0.1
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 962253134326.dkr.ecr.us-east-1.amazonaws.com
docker push 962253134326.dkr.ecr.us-east-1.amazonaws.com/todoly:0.0.1

Run

docker run --rm -it -p 8080:8080 --name todoly-app todoly:latest

Check

http://localhost:8080/actuator/health

And the result

healt-cheack image

Usage

Can be used with any rest client application

To create task

Note: The title or due date should not be empty and title should be min five characters, also due date must be a future date.

POST
localhost:8080/todoly/task

{
    "title": "Title of task",
    "description": "Description of task",
    "dueDate": "20-03-2080 16:00:55"
}

To list all tasks

GET
localhost:8080/todoly/tasks

To get a task with id

GET
localhost:8080/todoly/task/<id>

To delete a task with id

DELETE
localhost:8080/todoly/task/<id>

To filter tasks by due date

GET
http://localhost:8080/todoly/tasks/duedate?duedate=yyyy-MM-ddTHH:mm:ss

To filter tasks by title or description

GET
http://localhost:8080/todoly/tasks/titleordesc?keyword=<word to search>