Skip to content

enahomurphy/micro-recipe

Repository files navigation

Recipe Service


The recipe service contains and holds all endpoints related to managing and creating recipes. Below is a list of all recorded endpoints and their HTTP verbs

Service Features

  1. CATEGORIES
    • Crud operation for recipe categories
  2. RECIPES
    • Crud operation for recipes
  3. INGREDIENTS
    • Crud operation for ingredients

Technologies


  1. Nodejs 8
  2. mongoDB
  3. Express
  4. Mongoose ODM
  5. Docker

Below are the API endpoints and their functions


  1. A full detailed documentation of All APi endpoints and their responses can be found in the raml file.

  2. You can also use the swagger.yml file to generate a full Api documentation

  3. Or you just visit the link swagger docs for api documentation

verbs endpoints description
GET /recipes Get all recipes
POST /recipes Creates new recipe
PATCH /recipes/ Updates a recipe
DELETE /recipes/ Deletes a recipe
GET /recipes/ Gets a single recipe
GET /categories Gets all categories
POST /categories Creates a new category
PATCH /categories/ Updates a category
DELETE /categories/ Deletes a category
GET /categories/ Gets a single category
GET /categories//recipes Gets all recipe that belongs to a category
GET /categories?q={query} Searches for categories
GET /categories?limit={limit} Limits categories
GET /categories?page={page} paginates categories  
GET /recipes//ingredients Gets all ingredients related to recipe
GET /recipe//ingredients Gets all ingredients
POST /recipe//ingredients Creates new ingredients
PATCH /ingredients/ Updates an ingredient
DELETE /ingredients/ Deletes an ingredient
GET /ingredients/ Gets a single ingredient
GET /recipe//ingredients?q={query} Searches for ingredients
GET /recipe//ingredients?limit={limit} limits search result
GET /recipe//ingredients?page={page} paginates result set

POSTMAN COLLECTION


You can get all endpoints directly on you postman collection by clicking on the link below

Run in Postman

How to use

  • Clone repository
  • Cd into the recipe folder
  • create a .env file for the .env.sample file
  • Add your DB_URL and NODE_ENV
  • run "npm start"
  • make your API calls to localhost:8080/api/v1/recipes

How to Contribute

  • Fork repo to your account
  • Clone the repo
  • Add a feature and raise a PR to the base branch
  • PR is reviewed and merged

About

test project for developing highly reusable node/mongo services

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors