Skip to content

Latest commit

 

History

History
55 lines (38 loc) · 1.88 KB

File metadata and controls

55 lines (38 loc) · 1.88 KB

🧾 Recipe Book Server

This is the backend server for the Recipe Book App, built using Node.js, Express.js, and MongoDB.

🔗 Live Server

🚀 Hosted on: https://cecipe-server-site.vercel.app/
(Note: Replace with your actual deployed server URL)

✅ Features

  • 🔐 User authentication data storage
  • 🧾 Recipe CRUD (Create, Read, Update, Delete)
  • 💖 Like functionality for recipes
  • 🌟 Fetch Top 6 Recipes by likes
  • 🔍 My Recipes filtering by user email
  • 🛡 Protected routes handled in client side

🧑‍🍳 API Endpoints

📦 Recipes

Method Route Description
GET /recipes Get all recipes
GET /recipes/:id Get a specific recipe by ID
POST /recipes Add a new recipe
PUT /update-likes/:id Update like count of a recipe
GET /topRecipes Get top 6 recipes sorted by likes
PUT /updateRecipe Update a recipe (full replace)
DELETE /deleteRecipe/:id Delete a recipe by ID

👤 Users

Method Route Description
GET /users Get all users
POST /users Add a new user

🍽 My Recipes

Method Route Description
GET /myRecipes Get recipes added by logged-in user

📁 Tech Stack

  • Backend: Node.js, Express.js
  • Database: MongoDB Atlas
  • Environment: dotenv for secure keys

🔐 Environment Variables

Ensure to create a .env file with the following: