This API manages tasks with functionalities like creating, delegating, deleting, updating tasks, and filtering tasks by priority, status, and tags.
- Task Creation: Create new tasks with details like priority, status, and tags.
- Task Delegation: Assign tasks to users.
- Task Update: Modify task details.
- Task Deletion: Remove tasks.
- Filtering: Filter tasks based on priority, status, and tags.
Ensure you have the following installed:
-
Clone the repository:
git clone https://github.com/pdagboola/task_management_hng.git cd task_management_hng
-
Install dependencies:
npm install
-
Create a
.env
file in the root directory and configure the following variables:DB_URL
: Your PostgreSQL database connection string.SECRET_KEY
: A secret key used for JWT authentication.
-
Run the application:
node app.js
- Description: Create a new task.
- Request Body:
{ "title": "Task Title", "priority": "High", "status": "Pending", "tags": ["Tag1"] }
- Response: Task details with a success message.
- Description: Get all tasks.
- Query Parameters:
priority
,status
,tags
for filtering. - Response: List of tasks based on the filters.
- Description: Update an existing task.
- Request Body:
{ "title": "Updated Task", "status": "Completed" }
- Response: Updated task details.
- Description: Delete a task by ID.
- Response: Confirmation message.