Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task24

Recipe App RESTful API

This is a Node.js RESTful API for a Recipe App using MongoDB Atlas for data storage. The API allows users to manage recipes (create, read, update, delete) with features such as pagination and error handling.

Prerequisites

  • Node.js
  • MongoDB Atlas account
  • Postman/Insomnia for testing the API

MongoDB Atlas Setup

  1. Create a MongoDB Atlas cluster.
  2. Obtain the connection string and replace <username> and <password> in .env file.

Installation & Setup

  1. Clone the repository and navigate to the project directory.
  2. Install dependencies:
    npm install

Create a .env file with the following MONGO_URI=mongodb+srv://:@.mongodb.net/recipeapp PORT=5000

Start the server: bash

node server.js API Endpoints POST /api/recipes Create a new recipe.

GET /api/recipes Get all recipes.

GET /api/recipes/:id Get a recipe by its ID.

PUT /api/recipes/:id Update a recipe by its ID.

DELETE /api/recipes/:id Delete a recipe by its ID.

Testing Use Postman

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages