TASK MANGEMENT SERVER

THIS IS TASK MANAGEMENT SERVER BUILD USING NODE.JS, MONGO-DB AND TWILIO.

Installation

  1. Clone the repository:

    git clone <REPO_LINK>
    cd task_management_server
  2. Install dependencies:

    npm install
  3. Set up Enviornment Variables On the .env file add the variables:

        MONGO_URL=""
        JWT=""
        TWILLO_ACCOUNT_SID=""
        TWILLO_AUTH_TOKEN=""

Running the Application

npm run watch  // Run this in one terminal
npm run dev    // Run this on another terminal

1st command compiles the typescript to javascript.

API Endpoints

User Routes

  1. POST /user/register : Register the user
  2. GET /user/:userId : Get User Details

TASK Routes

  1. POST /task/ : Create a task.
  2. GET /task/ : Get all tasks of the user.
  3. PATCH /task/:taskID : Update the particular task
  4. DELETE /task/:taskId : Soft delete the task

SUB-TASK Routes

  1. POST /subtask/ : Create the subtask of a task
  2. GET /subtask/ : Get all the subtasks of the task.
  3. PATCH /task/:taskId : Update the particular sub-task.
  4. DELETE /task/:taskId : Delete the particular sub-task.

CRON JOBS

  1. Priority Assign - This cron is scheduled to run every midnight at 0000 Hrs to update the priority of each task which is calculated on the basis of the proximity of due date.

  2. Calling Reminder - This cron bascically runs every hour and sees if task is due then it calls the user and gives a reminder.