Skip to content

Resepin RESTful API is an API that allows users to read recipe information data from a database. The Food Recipe RESTful API also allows users to create, update, and delete recipe information to/from the database.

Notifications You must be signed in to change notification settings

wahyuwww/Backend-resepin

Repository files navigation

Food Recipe App
RESTful API with Express.js


Explore the docs »
View Demo

Introduction

Resepin RESTful API is an API that allows users to read recipe information data from a database. The Food Recipe RESTful API also allows users to create, update, and delete recipe information to/from the database.

Node.js Express.js PostgreSQL body-parser cors dotenv helmet pg xss-clean

Requirements

  1. Node Js
  2. Express JS
  3. Postman
  4. Web Server (ex. localhost)
  5. Code Editor (VS Code, Sublime, Atom, etc)

Getting Started

Node.js

Node.js is a software that designed to develop web-based applications and is written in the syntax of the JavaScript programming language. JavaScript as a programming language that runs on the client / browser side only can be completed by Node.js. With Node.js, JavaScript can also act as a programming language that runs on the server side, such as PHP, Ruby, Perl, and so on.

Node.js can run on Windows, Mac OS X and Linux operating systems without the need for program code changes. Node.js has its own HTTP server library that make it possible to run a web server without using a web server program such as Apache or Nginx.

Express.js

Express.js is one of the most popular web frameworks for Node.js. The complete documentation and its use which is quite easy, can make us develop various products such as web applications or RESTful API.

Installation

  1. Clone or download this repository
  2. Open app's directory in CMD or Terminal.
  3. Type in Terminal npm install to install the required packages.
  4. Make a new file, .env and setup the file. instruction here
  5. Turn on Web Server and PostgreSQL, (Also can be done with third-party tools like XAMPP, WAMP, etc)
  6. Setup the database. instruction here
  7. Open Postman desktop application or Chrome web extension (Install Postman if you haven't yet)
  8. Choose HTTP Method and enter the request URL.(i.e. localhost:5000/recipe)
  9. Check all Endpoints here

Setup .env file

Open .env file on code editor and copy the code below :

# app
SERVER_PORT=4000

# database
DB_HOST="Your_Host"
DB_USERNAME="Your_Username"
DB_PASSWORD="Your_Password"
DB_DATABASE ="Your_Table"
DB_PORT = "Your_port_DB"


# jwt
SECRET_KEY = "secret key you"

# cloudinary
CLOUDINARY_CLOUD_NAME = "cloud name"
CLOUDINARY_API_KEY = "api key "
CLOUDINARY_API_SECRET = "secret key"

API Reference

Parameter Type Description
id string Required. Id of item to fetch

Get all recipe

  GET /food
Parameter Type Description
search string Required. Your API key
limit number Required. Your API key
sort string Required. Your API key
page number Required. Your API key

Related Project

🚀 Backend Resepin

🚀 Frontend Resepin

🚀 Web Service

🚀 Demo Resepin

Link Rest Api Dokumentasion Postman

Contact

Wahyu Dwi Purwanto - linkedin - wahyu.aan2508@gmail.com

License

Distributed under the MIT License.

About

Resepin RESTful API is an API that allows users to read recipe information data from a database. The Food Recipe RESTful API also allows users to create, update, and delete recipe information to/from the database.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published