rfsants001 / task-api

An api task manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Task API

This repository contains a Task API implemented in Java using the Spring framework. The API allows for the management of tasks, including creating, updating, deleting, and listing tasks, as well as retrieving details of specific tasks.

Technology Stack

  • Java
  • Spring Boot
  • Spring Data JPA
  • Database: MongoDB

Setup

Before running the API, make sure you have Java and MongoDB installed on your machine.

  1. Clone this repository to your local machine:
git clone https://github.com/rfsants001/task-api.git
  1. Navigate to the project directory:
cd task-api
  1. Configure the MongoDB database:

    • Ensure that MongoDB is installed and running on your local machine.
    • Open the src/main/resources/application.properties file and adjust the MongoDB connection settings if needed.
  2. Run the API:

./mvnw spring-boot:run

The API will be available at http://localhost:8080.

Usage

You can use an HTTP client (e.g., cURL) or a tool like Postman to interact with the API.

Here are some example requests:

  • Create a new task:

    POST /tasks
    Content-Type: application/json
    
    {
      "title": "My first task",
      "description": "Perform an important task"
    }
    
  • List all tasks:

    GET /tasks
    
  • Retrieve details of a specific task:

    GET /tasks/{taskId}
    
  • Update an existing task:

    PUT /tasks/{taskId}
    Content-Type: application/json
    
    {
      "title": "Updated task",
      "description": "Task updated successfully"
    }
    
  • Delete a task:

    DELETE /tasks/{taskId}
    

Contribution

Contributions are welcome! If you encounter any issues or have suggestions for improvements, feel free to open a new issue or submit a pull request.

License

This project is licensed under the MIT License.

I hope this helps! If you have any further questions, feel free to ask.

About

An api task manager


Languages

Language:Java 100.0%