Skip to content

Ocraniawan/Food_Delivery_API

Repository files navigation

Food_Delivery_App

Make Backend Food Delivery App With Express.js

ExpressJS - Food Delivery

Food Delivery App is a simple Food Delivery application specially for backend only. Built with NodeJs using the ExpressJs Framework. Express.js is a web application framework for Node.js. More about Express

Built With

Express.js Node.js

Requirements

  1. Node Js
  2. Node_modules
  3. Postman
  4. Web Server (ex. localhost)

How to run the app ?

  1. Open app's directory in CMD or Terminal
  2. Type npm install
  3. Make new file a called .env, set up first here
  4. Turn on Web Server and MySQL can using Third-party tool like xampp, etc.
  5. Create a database with the name food_delivery, and Import file food_delivery.sql to phpmyadmin
  6. Open Postman desktop application or Chrome web app extension that has installed before
  7. Choose HTTP Method and enter request url.(ex. localhost:3000/item)
  8. You can see all the end point here

Set up .env file

Open .env file on your favorite code editor, and copy paste this code below :

PORT=3000
HOST=localhost
USER=root // default
PASS= // default
DATABASE=food_delivery
NODE_ENV=development node server.js

End Point

1. GET

  • /:id
  • /restaurant/
  • /restaurant/:id_restaurant
  • /item/ (Get all Item with pagination)
  • /item/:id:item (get detail item by id)
  • /carts/:id
  • /valuation/:item_id
  • /categories/ (Get All Categories)
  • /categories/:id_categories (Get Categories by id)
  • /categories/detail/id_categories (Show all item with categories id)
  • /item/search (Search Item By name or price or rating)
  • /restaurant/menu/id_restaurant (show all menu/item by id restaurant)

2. POST

  • /login

  • /logout

  • /register

  • /registerest

  • /restaurant/

  • /item/ (Add Item)

  • /carts/ (Add to Cart)

  • /valuation/ (Add Review and Rating)

  • /categories/ (Add Categories)

3. PUT

  • /:id (Edit User Account)

    • { "name": "arka", "username": "Demy", "password": "arkademy", "role_id": 3 }
  • /item/:id_item (Edit item)

  • /restaurant/:id_restaurant

  • /carts/:id_carts

  • /carts/checkout/:id_carts (CheckOut item)

  • /categories/id_categories (Edit Categories)

4. DELETE

  • /:id (Delete User Account)
  • /item/:id_item (Delete Item)
  • /restaurant/:id_restaurant (Delete Restaurant)
  • /carts/:id (Delete Item On Cart)
  • /categories/:id_categories (Delete Categories)

About

Make Backend Food Delivery App With Express.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published