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:

MethodEndpointDescriptionURL
GETapi/tasksGet all taskshttps://tasks.yunusemre.dev/api/tasks
GETapi/tasks/idGet a specific taskhttps://tasks.yunusemre.dev/api/tasks/9
POSTapi/tasksCreate a new taskhttps://tasks.yunusemre.dev/api/tasks
PUTapi/tasks/idUpdate an existing taskhttps://tasks.yunusemre.dev/api/tasks/9
DELETEapi/tasks/idDelete an existing taskhttps://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:

  1. Clone the repository
  2. Install the dependencies with npm install
  3. Create .env file with provided DATABASE_URL
  4. 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