- Clone the project
git clone ${project_url} - Install the dependencies with npm
npm install - Set the enviroment variables on
.envsuch as the.env-examplefile - Create a database cluster on MongoDB Atlas and add the connection string to the MONGO_CLUSTER at the enviroment variables. Add the User and Password to MONGO_USER_ADMIN and MONGO_PASSWORD as well.
- Run
npm startat terminal
Note: The Database will start unseeded and unfortunately for now I do not have a seeded db to provide.
[POST] /auth/register
Requisition:
Expected body: { "email": "string", "password": "string", "username": "string" }Response:
Expected body: { "username": "string", "email": "string", "authentication": { "password": "string", "salt": "string" }, "_id": "hex64", "__v": 0 }
[POST] /auth/login
Requisition:
Expected body: { "email": "string", "password": "string", }Response:
Expected body: { "authentication": { "password": "string", "salt": "string" }, "_id": "hex64", "username": "string", "email": "string", "__v": 0 }
[GET] /users
Requisition:
Expected body: {}Response:
Expected body: [ { "_id": "hex64", "username": "string", "email": "string", "__v": 0 }, {}... ]
[DELETE] /users/:id
Requisition:
Expected body: {}Response:
Expected body: { "_id": "hex64", "username": "string", "email": "string", "__v": 0 },
[PATCH] /users/:id
Requisition:
Expected body: { "username": "string", }Response:
Expected body: { "_id": "hex64", "username": "string", "email": "string", "__v": 0 },