LucasDsy / nodejs_tasks_api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Projet Node JS

Versions

node 14.4.0
npm 7.7.6

Librairies

express
lowdb
jsonschema
uid
bcrypt
jsonwebtoken
dotenv

Run

npm install
node index.js

JSON Objects Structures

Tasks :

{
    "name": "Task 3",
    "title": "Un TP",
    "dateBegin": "01/04/2021",
    "dateEnd": "30/04/2021",
    "username": "Bob",
    "status": "processing"
}

Users :

{
    "username": "Bob",
    "password": "hello"
}

API Endpoints

/users/login - POST

Connexion à l'API : renvoie un token JWT

/users/register - POST

Création d'un nouvel utilisateur.

/tasks - GET

Affichage des tâches.
Authentification nécessaire.

/tasks/:id - GET

Affichage d'une tâche.
Authentification nécessaire.

/tasks - POST

Création d'une tâche.
Authentification nécessaire.

/tasks/:id - PUT

Modification d'une tâche.
Authentification nécessaire.

/tasks/:id - DELETE

Suppression d'une tâche.
Authentification nécessaire.

About


Languages

Language:JavaScript 99.7%Language:Shell 0.3%