This project is a Node.js tasks API where users can perform CRUD operations on tasks.
| NodeJs | Express |
This project uses a JSON file as a database to store tasks. The file tasks.json contains the task data, including task id, task description, the completion status, the category and priority.
-
Clone the repository: cd your-repository npm install git clone https://github.com/your-username/your-repository.git
-
Start the server: npm start
-
Access the API at http://localhost:8000 in your preferred API testing tool.
- Description: Get all tasks.
- Example:
GET http://localhost:8000/tasks
- Description: Get a specific task by ID.
- Example:
GET http://localhost:8000/tasks/1
- Description: Create a new task.
- Example:
POST http://localhost:8000/tasks Body: { "task": "Do something", "done": false, "category": "Work", "priority": "High" }
- Description: Edit a specific task by ID.
- Description: Delete a task by ID.
So, if you're interested, check it out! 🙂