Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 1.83 KB

README.md

File metadata and controls

57 lines (39 loc) · 1.83 KB

Pastry shop - Backend

Dependencies and libraries used

Application Structure

  • index.js - The entry point of application.
  • constants/ - This folder contains constants declaration.
  • models/ - This folder contains the schema definitions of Mongoose models.
  • routes/ - This folder contains the route definitions of API.
  • utils/ - This folder contains utils functions.

API Endpoints

List of available routes:

Register admin routes:

URL Method What
/api/register POST Create admin user

Login admin routes:

URL Method What
/api/login POST Login admin user

Products routes:

URL Method What
/api/products GET Get products
/api/products POST Create new one product (Admin)
/api/products/:_id PATCH Update product properties (Admin)
/api/products/:_id DELETE Delete product (Admin)
/api/products/:_id GET Get specific product

Ingredients routes:

URL Method What
/api/ingredients GET Get list of all ingredients

Run server

npm start

Run server on: http://localhost:8000