Jansenck / taskme

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TASKME

functionality

  • Add a student (user)
  • List all students
  • Delete a student
  • Add a new task
  • List all tasks
  • List pending tasks
  • Delete a task
  • Update a task

Documentation (API)

POST: /students

  {
    "name": "Pedro"
  }

GET: /students

  [
    {
      "id": 1,
      "name": "Pedro"
    },
    {
      "id": 2,
      "name": "Jansen"
    }
  ]

DELETE: /students/:studentId

GET: /tasks

  [
    {
      "id": 1,
      "name": "Pedro",
      "task": "read a new book",
      "description": "get some amazing book to read",
      "status": false
    },
    {
      "id": 2,
      "name": "Marcos",
      "task": "gym",
      "description": null,
      "status": false
    },
    {
      "id": 3,
      "name": "Jansen",
      "task": "to code",
      "description": "start a new fullstack project",
      "status": true
    }
  ]

GET: /tasks/pending

  [
    {
      "id": 1,
      "name": "Pedro",
      "task": "read a new book",
      "description": "get some amazing book to read",
      "status": false
    },
    {
      "id": 2,
      "name": "Marcos",
      "task": "gym",
      "description": null,
      "status": false
    }
  ]

POST: /task/:studentId

    {
      "name": "ride a bike",
      "description": "get some mountains"
    }

DELETE: /tasks/:taskId

UPDATE: /tasks/:taskId

    {
      "name": "ride a bike",
      "description": "get some mountains",
      "status": true
    }

Technologies

  • GIT
  • GITHUB
  • LINUX
  • NODE
  • TYPESCRIPT
  • POSTGRES

How to use

  1. Clone the repository
  2. Use the dump.sql as database model to create a database
  3. Install all project dependencies
  npm i
  1. Config .env file
  2. Start the app
npx nodemon src/server.ts

About


Languages

Language:TypeScript 99.1%Language:Shell 0.9%