This is the backend server for the Recipe Book App, built using Node.js, Express.js, and MongoDB.
π Hosted on: https://cecipe-server-site.vercel.app/
(Note: Replace with your actual deployed server URL)
- π 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
| 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 |
| Method | Route | Description |
|---|---|---|
| GET | /users |
Get all users |
| POST | /users |
Add a new user |
| Method | Route | Description |
|---|---|---|
| GET | /myRecipes |
Get recipes added by logged-in user |
- Backend: Node.js, Express.js
- Database: MongoDB Atlas
- Environment: dotenv for secure keys
Ensure to create a .env file with the following: