Task Management API
September 8, 2023 ยท View on GitHub
This documentation provides an overview of the Task Management API https://tasks.yunusemre.dev/api/tasks. The API allows users to manage tasks by providing endpoints for creating, retrieving, updating, and deleting tasks.
Endpoints
The API has the following endpoints:
| Method | Endpoint | Description | URL |
|---|---|---|---|
| GET | api/tasks | Get all tasks | https://tasks.yunusemre.dev/api/tasks |
| GET | api/tasks/id | Get a specific task | https://tasks.yunusemre.dev/api/tasks/9 |
| POST | api/tasks | Create a new task | https://tasks.yunusemre.dev/api/tasks |
| PUT | api/tasks/id | Update an existing task | https://tasks.yunusemre.dev/api/tasks/9 |
| DELETE | api/tasks/id | Delete an existing task | https://tasks.yunusemre.dev/api/tasks/9 |
Postman collection:
https://documenter.getpostman.com/view/19399613/2s9Y5ZvMbe
Stack:
- Node.js as a runtime environment
- TypeScript for typesafe development
- Express as a web framework
- PostgreSQL for a relational database
- Prisma as an ORM
- Joi for input validation
- Jest and Supertest for unit testing
- Heroku for app deployment
- Render for database deployment
- GitHub Actions for CI/CD pipeline
Installation:
- Clone the repository
- Install the dependencies with
npm install - Create
.envfile with providedDATABASE_URL - Run the application with
npm run dev
Test:
Run npm test to run tests. Jest and Supertest have been used for unit testing. Tests cover invalid/empty inputs and successful queries.
Pipeline:
The app does not proceed to the deployment phase until the CI/CD pipeline is successfully completed. See the GitHub workflow steps: https://github.com/YuunsGit/task-manager/blob/main/.github/workflows/node.js.yml