This project is a Task Management System built using Node.js and a SQL database. It provides a set of CRUD APIs for managing tasks, as well as an API to get task metrics.
- infeedo_task/
- src/
- controllers/
- taskController.js
- models/
- Task.js
- routes/
- taskRoutes.js
- services/
- taskService.js
- database/
- db.js
- controllers/
- tests/
- taskRoutes.test.js
- node_modules/
- package.json
- app.js
- README.md
- .gitignore
- src/
- API to create a new task.
- API to update an existing task.
- API to get a paginated list of all tasks.
- API to get task metrics including open tasks, in-progress tasks, and completed tasks.
- Swagger documentation for easy API reference.
- Bulk load random tasks for testing purposes. (See utils/loadTasks.js)
- Dockerise the source code to run as a docker image.
Docker running in the workstation OR having Node + Sqlite installed in the machine.
Build the docker image. Run the below command in the project directory:
docker build -t infeedo_task .
Run the docker image:
docker run -p 3000:3000 infeedo_task
Install the dependencies:
yarn install
Start the development server:
yarn start
Verify the server has started, you should see the below message on the terminal.
Server is running on port 3000
Youn can access the APIs on http://localhost:3000/
Swagger UI is available at http://localhost:3000/api-docs/