Giter Site home page Giter Site logo

grocipe_backend's Introduction

grocipe_backend

project instructions:

  • this project can run locally.

  • to run this project locally you need to make sure you have npm, nodejs,mongodb preinstalled in your machine.

  • make sure to create your own .env files and fill the required variables such HOST,PORT,Database URI, API key for spoon

  • to benign with the project please run the following commands:

    • npm run setup it will update npm and install the required packages.
    • npm run dev to run the server in development mode in your own machine.
    • npm run start:prod to run the server in production mode.
  • to do request with the spoon api you need an api key, please visit this and acquire an api key and put it in the .env files.

Endpoints used in the iOS application:

I have created simple iOS app demonstrate the backend functionalities, I mainly used the following endpoints

  • /searchByIngredients which is search for recipes by ingredients, it is validated using express validator. To call this endpoint you need the following body:

    •   {"ingredients":["rice", "apple"], "number": 100} 
    • {"ingredients":["rice", "apple"], "number": "100" , "limitLicense": "true", "ranking":1, "ignorePantry":true}
    • Note that keys limitLicense, ranking, ignorePantry , are optionals
  • /searchIngredientsById/:id which will search for recipe by its id and get its details such as image,name,preparation plan and time this end point only takes query, /searchIngredientsById/123 in that case the id is 123

Code documentation:

The code well written and documented using jsDocs, and following MVC architecture.

grocipe_backend's People

Contributors

nawafswe avatar snyk-bot 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.