Skip to content

๐ŸŸ Dev's Burguer Order is a web application that allows users to create, read, update, and delete burger orders.

License

Notifications You must be signed in to change notification settings

Kayke-Fujinaka/devburger-orders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŸ Dev's Burger Order

Gif do Teste

๐Ÿ“„ Description

Burguer Order CRUD is a web application that allows users to create, read, update, and delete burger orders. Users can create new orders, view existing orders, modify orders, and remove orders from the system. The application also includes a login and registration system to secure user data. Burguer Order CRUD is built using React, Node.js, and MongoDB, making it scalable and efficient.

Routes

  • POST /order: This route receives the customer's order, customer's name, and order value, which are passed in the request body, and are placed inside an array.

  • GET /order: Route that lists all orders already made.

  • PUT /order/:id: This route changes an already made order.

  • DELETE /order/:id: This route deletes an already made order with the id sent in the route parameters.

  • GET /order/:id: This route receives the id in the parameters and returns a specific order.

  • PATCH /order/:id: This route receives the id in the parameters and as soon as it is called, changes the status of the order received by the id to "Ready".

Example

If I call the POST /order route passing { order: "Cheeseburguer, Balde de nugget, 1 รgua", clienteName:"Cleber Rocha", price: 44.50 }, the array should look like this:

[
  {
    id: "ac3ebf68-e0ad-4c1d-9822-ff1b849589a8",
    order: "Cheeseburguer, Balde de nugget, 1 รgua",
    clienteName:"Cleber Rocha", 
    price: 44.50,
    status:"Em preparaรงรฃo"
  }
];

If I call the PATCH /order/ac3ebf68-e0ad-4c1d-9822-ff1b849589a8, route, the array should look like this:

[
  {
    id: "ac3ebf68-e0ad-4c1d-9822-ff1b849589a8",
    order: "Cheeseburguer, Balde de nugget, 1 รgua",
    clienteName:"Cleber Rocha", 
    price: 44.50,
    status:"Pronto"
  }
];

Middlewares

MIDDLEWARE CHECK - It will receive the ID and check if it exists. If it doesn't exist, it will send an error message, but if it exists, the request will be continued.

MIDDLEWARE METHOD - It displays the request method (GET, POST, PUT, DELETE, etc) and also the request URL.

Example

Method: [GET] - URL: /order

๐Ÿš€ Technologies

The following tools were used in this project:

๐Ÿ“• Requirements

Before starting, you need to have Git and Node installed on your computer.

๐Ÿ Getting Started

# Clone this project
$ git clone https://github.com/Kayke-Fujinaka/Dev-s-Burger-Orders
# Access
$ cd Desafio
# Install dependencies
$ npm 
# Run the project
$ npm start 
# The server will initialize in the <http://localhost:3001>

๐Ÿค Contributors

We want to thank the following people who contributed to this project:

Kayke Fujinaka's photo on GitHub
Kayke Fujinaka

๐Ÿ“ License

This project is under license. See the LICENSE file for more details.

ย 

Back to top

About

๐ŸŸ Dev's Burguer Order is a web application that allows users to create, read, update, and delete burger orders.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published