This is basic todo-list JAVA project using Spring and PostgreSQL.
This project has a couple of endpoints for tasks and user management.
- Get all users:
GET localhost:8080/users
- Get user by id:
GET localhost:8080/users/{userId}
- Create a new user:
POST localhost:8080/users
Body example:
{
"name": "John",
"email": "johnnyjohn@john.com"
}
- Update user:
PUT localhost:8080/users/{userId}
Body example:
{
"name": "John",
"email": "johnnyjohn@john.com"
}
- Delete user:
DELETE localhost:8080/users/{userId}
- Get all tasks:
GET localhost:8080/tasks
- Get task by id:
GET localhost:8080/tasks/{taskId}
- Get all tasks for user:
GET localhost:8080/tasks/by-user/{userId}
- Create a new task:
POST localhost:8080/tasks
Body example:
{
"description": "Walk the dog",
"user": 1
}
- Update task status:
PUT localhost:8080/tasks/{taskId}
Body example:
{
"newStatus" : "IN_PROGRESS"
}
- Delete task:
DELETE localhost:8080/tasks/{taskId}
To run this app you simply have to go to the root of the project and simply do:
make run
And that should run the both containers.