To build an application (API) and a database for producing content for a blog in which it will be possible to create an user, login with an authentication token, register a post, view all posts, search for specifics posts, edit and delete informations.
This application encourages the use of:
-
Develop an API of a
CRUD
(Create, Read, Update and Delete) of posts inNode.js
using thesequelize
package; -
Develop some endpoints that will be connected to your database following
REST
principles; -
According to the business rule of the application,
association
relationships between database tables must be developed.
- Initialize a container running with
docker
π³ - Asynchronous flows
- Creating HTTP APIs with Node via Express
- Receiving data from routes via: body, headers, query string, params
- Validation and authentication middlewares
- HTTP Status Codes
- 1 - Create migrations for User, Categories, BlogPosts, PostCategories entities
2 - Create the endpoints:
- 2.1 - POST /login
- 2.2 - POST /user
- 2.3 - GET /user
- 2.4 - GET /user/:id
- 2.5 - POST /categories
- 2.6 - GET /categories
- 2.7 - POST /post
- 2.8 - GET /post
- 2.9 - GET /post/:id
- 2.10 - PUT /post/:id
- 2.11 - DELETE /post/:id
- 2.12 - DELETE /user/me