Skip to content

Latest commit

 

History

History
103 lines (76 loc) · 2.82 KB

README.md

File metadata and controls

103 lines (76 loc) · 2.82 KB

MamaRecipe-backend

Simple, easy implementation of the private web API.

About The Project

API build in Express.js and MySQL for SemediTeam/recipedia-frontend

Prerequisites

  • npm
    npm install npm@latest -g

Schema Database

Installation

  1. Clone the repo
    git clone https://github.com/SemediTeam/recipedia-backend.git
  2. Install NPM packages
    npm install
    This will install the dependencies inside node_modules

ENV configuration

Please create and make the changes in the .env file.

HOST = "YOUR_DB_HOSTNAME"
USER = "YOUR_DB_USERNAME"
PASS = "YOUR_DB_PASSWORD"
DB = "YOUR_DB_NAME"

PORT = "YOUR_PORT"

SECRET_KEY = "YOUR_SECRET_KEY"

LOCAL = "YOUR_API_URL"

FROM = "YOUR_EMAIL_NAME"
EMAIL = "YOUR_EMAIL_ID"
EPASS = "YOUR_EMAIL_PASS"

Usage

node index OR nodemon start OR npm start

Runs the app in the development mode.
Open http://localhost:4000/ to view it in the browser.

Endpoint

Method Endpoint Description
POST /auth/register Register New User
POST /auth/login Login User
POST /auth/logout Logout User
GET /auth/verify Activate User Account
POST /auth/forgot Forgot Password User
POST /auth/otp Verif OTP Forgot Password
PATCH /auth/reset Reset Password User
GET /recipe Get All Recipes
GET /recipe/new Get All Recipe By New
GET /recipe/popular Get All Recipe By Popular
GET /recipe/:id Get Single Recipe By Id
GET /recipe/byuser Get Single Recipe By Id User
POST /recipe Add New Recipe
PATCH /recipe/:id Update Recipe
DELETE /recipe/:id Delete Recipe
SEARCH /search?recipe_name= Search Recipe By Recipe Name
GET /comments/:id Get Comments By Id Recipe
POST /comments Get Comments
POST /likes Add Likes Recipe
GET /likes Get Likes Recipe
DELETE /likes/:id Delete / Unlikes Recipe
POST /bookmarks Add Bookmars Recipe
GET /bookmarks Get Bookmarks Recipe
DELETE /bookmarks/:id Delete Bookmarks Recipe

Documentation

For more info visit Postman 1 Postman 2

Related Project

RESTful API for this web application, clone this for development Mama Recipe.

Mama Recipe Client

License

Distributed under the MIT License.