Skip to content

Latest commit

 

History

History
69 lines (56 loc) · 1.44 KB

README.md

File metadata and controls

69 lines (56 loc) · 1.44 KB

Foodle: Hapi.js based RESTful API

A Hapi.js based RESTful API.

Requirements:

  1. Node.js / npm package manager
  2. Yarn package manager

Install Yarn globally by,

npm i -g yarn

Instructions:

Clone the repo,

git clone https://github.com/JaganKaartik/Foodle_Hapi_REST_API.git
cd Foodle_Hapi_REST_API

Install all the dependencies by,

yarn run install 

To start the server run,

yarn run dev

Alternatively you can specify the enviornment and start the server by,

export NODE_ENV=development 
yarn run start

API is served from http://localhost:8888

API Reference

    GET
    /api/dish/all
    Response: Array<dish>

    /api/dish/{id}
    Response: dish

    POST
    /api/dish/add
    Body: added dish

    PUT
    /api/dish/update
    Body: updated dish

    DELETE
    /api/dish/delete/{id}
    /api/dish/delete/all

GET /api/dish/all

GET /api/dish/{id}

POST /api/dish/add

PUT /api/dish/update

DELETE /api/dish/delete/{id}