A Hapi.js based RESTful API.
- Node.js / npm package manager
- Yarn package manager
Install Yarn globally by,
npm i -g yarn
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
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