renatompf / todo-list-app

Backend part of a To-do List app made in Java with Spring and PostgreSQL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

todo-list-app

This is basic todo-list JAVA project using Spring and PostgreSQL.

This project has a couple of endpoints for tasks and user management.

Endpoints:

Users:

  • 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}

Tasks:

  • 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}

How to run:

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.

About

Backend part of a To-do List app made in Java with Spring and PostgreSQL


Languages

Language:Java 95.7%Language:Dockerfile 3.2%Language:Makefile 1.1%