Skip to content

packetcode/rest-api-node-express

Repository files navigation

REST API using Node, Express & MongoDb

CURL Requests

The Cookbook postman collection present in the code named as - Cookbook.postman_collection.json

# Get all recipes

curl --location 'http://localhost:3000/recipes' \
--data ''

# Create Recipe

curl --location 'http://localhost:3000/recipes' \
--header 'Content-Type: application/json' \
--data '{
    "name": "Sandwich",
    "category": "Breakfast",
    "items": ["bread", "tomatoes", "cucumber", "onion"]
}'

# Get One Recipe

curl --location 'http://localhost:3000/recipes?name=Omlette' \
--data ''

# Update Recipe

curl --location --request PATCH 'http://localhost:3000/recipes/?id=65bfbf75871de38e28cdeab5' \
--header 'Content-Type: application/json' \
--data '{
    "category": "Lunch"
}'

# Delete Recipe

curl --location --request DELETE 'http://localhost:3000/recipes/?id=65bfbce2ceb8c35632547052' \
--data ''

YouTube Video:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published