@author: Luisangel Marcia - @CosmicTiger
JavaScript
- Node.JS
- Express.JS
- JWT
- BcryptJS
- Nodemon(dev)
- BodyParser
This project consists in a evaluation by Polpo recruiter team.
This API
consists in a simple CRUD
about a ToDo APP
called QuickTd in which possess server side validation, JWT Authentication
for users
, relations between the data
of the users
and its tasks
inside the application.
This Project possess a standard structure for Node.JS API Rest.
controllers
: In which possess all the functions that controls the data.middleware
: Consists in the implementation ofJWT
as a middleware in order to permit access withdecoded
anduncoded
token authentication for theusers
.models
: Carries out the models for theTask
s andUser
s Schema from themongodb
.routes
: Gives the routes in which a frontend application could request certain data in will haveresponses
in dependency of the method.app.js
: Possess the main execution ofnode.js
server in which theAPI
run.
In the following section the routes would be explained.
/auth/signup/
: It will create a newuser
;/auth/login/
: It will let theuser
to log in the application;
In order to use this routes its necessary to have a user registered
/api/tasks/
: Will apply a GET method in which will send all the tasks of the user./api/task/
: Will create task through a POST method for the data sent by the user./api/task/:taskId
: Will search through a GET method for a specific task of the user./api/task/:taskId
: Will update through a PUT method a specific task selected by the user./api/task/:taskId
: Will eliminate a task through a DELETE method selected by the user.
Only run the command yarn start.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:8080 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Not implemented