GithubHelp home page GithubHelp logo

glootie-backend's Introduction

Glootie Back-end RESTfull API

#RESTful API for Glootie SPA. 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 mamp, etc.
  5. Create a database with the name #nama_database, and Import file 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/)
  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 :

DB_HOST=localhost
DB_USER=root
DB_PASS=root
DB_DATABASE= dbname

JWT_KEY=PASSWORD
PORT=3000

End Point

End Point Menu

1. GET

  • /menu(Get all product)
  • /menu/:id(Get product by id)
  • /menu/search(Search product)

2. POST

  • /menu (Post product)
  • { "category_id": 1, "menu_name": "Black Forest", "menu_price": 50000 , "menu_status" : 1 | 0, "menu_image":"img files"}

3. PATCH

  • /menu/:id (Update product by id)
  • { "category_id": 1, "menu_name": "Black Forest", "menu_price": 30000 , "menu_status" : 1 | 0, "menu_image":"img files"}

4. DELETE

  • /menu/:id (Delete product by id)

End Point Category

1. GET

  • /category(Get all category)
  • /category/:id(Get category by id)

2. POST

  • /category (Post category)
  • { "category_name": "Foods", "category_status" : 1 | 0}

3. PATCH

  • /category/:id (Update category by id)
  • { "category_name": "Foods", "category_status" : 1 | 0}

4. DELETE

  • /category/:id (Delete category by id)

End Point Orders

1. GET

  • /order(Get all orders)
  • /order/:id(Get order by id)
  • /order/this-week-order(Get all orders this week)

2. POST

  • /order (Post orders)
  • [ { "menu_id": 4, "qty": 1 }, { "menu_id": 4, "qty": 1 } ]

End Point History

1. GET

  • /history(Get all History)
  • /history/:id(Get History by id)
  • /history/today-total(Get total todays income)
  • /history/today-yearly(Get total yearly income)
  • /history/chart(Get data for chart)

End Point Auth

1. GET

  • /users(Get all users)

  • /users/:id(Get user by id)

  • /users/login(Get user by id)

  • { "user_email": "@email", "user_password" : **** }

  • /users/register (Post Register)

  • { "user_email": "@email", "user_password" : ****, "user_name": "username" }

Glootie Postman:

glootie-backend's People

Contributors

mhdnaldi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.