Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rahulagrawal084/crud_operations
This project provides a set of basic CRUD (Create, Read, Update, Delete) operations using Mongoose, a popular MongoDB object modeling tool for Node.js.
https://github.com/rahulagrawal084/crud_operations
ejs-templates express method-override mongodb nodejs rest-api
Last synced: about 13 hours ago
JSON representation
This project provides a set of basic CRUD (Create, Read, Update, Delete) operations using Mongoose, a popular MongoDB object modeling tool for Node.js.
- Host: GitHub
- URL: https://github.com/rahulagrawal084/crud_operations
- Owner: rahulagrawal084
- Created: 2024-08-28T10:23:41.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-08-28T10:54:56.000Z (about 1 month ago)
- Last Synced: 2024-09-24T05:32:23.162Z (4 days ago)
- Topics: ejs-templates, express, method-override, mongodb, nodejs, rest-api
- Language: JavaScript
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CRUD-Operations
This project provides a set of basic CRUD (Create, Read, Update, Delete) operations using Mongoose, a popular MongoDB object modeling tool for Node.js.
# Features
* **Farms:** Manage farm details including name, location, and associated products.
* **Products:** Track product details such as name, category, price, and the farm where they are produced.
* **CRUD Operations:** Perform create, read, update, and delete operations on both farms and products.
* **Mongoose Integration:** Use Mongoose schemas and models for structured data management.# Installation
**1. Clone the Repository:**
* git clone https://github.com/yourusername/crud_operations.git
* cd crud_operations**2. Install Dependencies:**
* npm install# Usage
**1. Start the server:**
node index.js
**2. Farms API Endpoints:**
* **POST /farms:** Create a new farm
* **GET /farms:** Retrieve a list of all farms
* **GET /farms/:id:** Retrieve a specific farm by ID
* **PUT /farms/:id:** Update a farm's details
* **DELETE /farms/:id:** Delete a farm**3. Products API Endpoints:**
* **POST /products:** Create a new product
* **GET /products:** Retrieve a list of all products
* **GET /products/:id:** Retrieve a specific product by ID
* **PUT /products/:id:** Update a product's details
* **DELETE /products/:id:** Delete a product