A simple task management system implemented in Go using the Gin web framework and MongoDB as the database.
Visit the Site - Asim's Task Management System
This project provides a basic backend for managing tasks. It includes functionality for retrieving all tasks, creating a new task, updating an existing task, deleting a task, and fetching a task by its ID. The application uses MongoDB as the underlying database to store task information.
- Go installed on your machine
- MongoDB installed and running on localhost:27017
-
Clone the repository:
git clone https://github.com/Asim-eg/Task-Management-System.git cd TaskManage
-
Run the application:
go run main.go
The server will start on port 8080, and you can access the API endpoints.
- GET /tasks: Retrieve all tasks.
- GET /tasks/:id: Retrieve a task by ID.
- POST /tasks: Create a new task.
- PUT /tasks/:id: Update a task by ID.
- DELETE /tasks/:id: Delete a task by ID.
To create a new task, make a POST request to /tasks
with the following JSON payload:
{
"name": "Task 2 Created and Updated",
"description": "Task 1 Basically",
"isCompleted": true,
"createdAt": "2024-01-10T08:30:00Z",
"updatedAt": "2024-01-10T10:45:00Z",
"author": "Jane Smith",
"comments": ["Another comment", "Yet another comment"],
"shared": false
}
To update an existing task, make a PUT request to /tasks/:id
with the updated task details in the JSON payload.
To delete a task, make a DELETE request to /tasks/:id
.
- To retrieve all tasks, make a GET request to
/tasks
. - To retrieve a task by ID, make a GET request to
/tasks/:id
.
If you'd like to contribute to this project, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License.