Develop a feature for users to create tasks and task lists. Tasks can then be added to different task lists.
- Requires NodeJs
14.16.0
or higher - Requires docker compose https://docs.docker.com/compose/install/
git clone https://github.com/rehasan/task-manager.git
npm install
npm run build
npm run test
Postgres and API services will be building and executing with the following commands,
docker compose -f docker/docker-compose.yml build
docker compose -f docker/docker-compose.yml up -d
docker compose -f docker/docker-compose.yml down
Now, you should be able to explore the API locally from http://localhost:3000.
The following table shows overview of the Rest APIs that will be accessible,
Method | End Point | Note |
---|---|---|
GET |
api/tasks |
get all the tasks |
GET |
api/tasks/:id |
get a task by id |
GET |
api/tasks/:id/task-groups |
get all the task groups by task |
POST |
api/tasks/ |
create a task |
PUT |
api/tasks/:id |
update a task |
DELETE |
api/tasks/:id |
delete a task |
GET |
api/task-groups |
get all the task groups |
GET |
api/task-groups/:id |
get a task group by id |
GET |
api/task-groups/:id/tasks |
get all the tasks by task group |
POST |
api/task-groups/ |
create a task group |
PUT |
api/task-groups/:id |
update a task group |
DELETE |
api/task-groups/:id |
delete a task group |
PUT |
api/task-groups/:id/tasks/:taskId |
add a task to a task group |
DELETE |
api/task-groups/:id/tasks/:taskId |
remove a task from a task group |
Additionally, import postman collection with it's env to explore the API endpoints. Please remember to select task-manager.postman_collection.json
env variable while executing the API endpoints file from Postman.