Skip to content

afterdarkv1/ApiRest-Sequelize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RestApi-nodejs-Sequelize and testing

Basic REST API in which you can do GET, POST, PACTH and DELETE, testing can be done using Postman, Thunder Client, Insomia or similar testing applications

Authors

Website Railway

RestApi

Configuration to view the website locally

Follow these steps to correctly configure the project:

  1. Clone this repository to your local machine.
  2. npm install to install the necessary dependencies
  3. npm run dev to raise the server
  4. npm test to start the test

File structure

javascript javascript javascript javascript sequelize

EndPoint

Brand

Get All Brands URL: /api/brands/api/brands/
Method: GET Description: Retrieve a list of all brands

Get a Brand URL: /api/brands/:id Method: GET Description: Retrieve a specific brand

Update Brand URL: /api/brands/:id/api/brands/:id Method: PUT Description: Update a specific brand by ID. Request Body: JSON object with brand data.

Delete a Brand URL: /api/brands/:id Method: DELETE Description: Delete a specific brand by ID.

Get Products by Brand URL: /api/brands/:id/products Method: GET Description: Retrieve products associated with a specific brand by ID.

Products

Create a Product URL: /api/products/ Method: POST Description: Create a new product. Request Body: JSON object with product data.

Get All Products URL: /api/products/ Method: GET Description: Retrieve a list of all products.

Get a Product URL: /api/products/:id Method: GET Description: Retrieve a specific product by ID.

Update a Product URL: /api/products/:id Method: PUT Description: Update a specific product by ID. Request Body: JSON object with product data.

Delete a Product URL: /api/products/:id Method: DELETE Description: Delete a specific product by ID.

Users

Create a User URL: /api/users/ Method: POST Description: Create a new user. Request Body: JSON object with user data.

Get All Users URL: /api/users/ Method: GET Description: Retrieve a list of all users.

Get a User URL: /api/users/:id Method: GET Description: Retrieve a specific user by ID.

Update a User URL: /api/users/:id Method: PUT Description: Update a specific user by ID. Request Body: JSON object with user data.

Delete a User URL: /api/users/:id Method: DELETE Description: Delete a specific user by ID.

Get Products by User URL: /api/users/:id/products Method: GET Description: Retrieve products associated with a specific user by ID.

Tolls

vscode git github

Releases

No releases published

Packages

 
 
 

Contributors