Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prabal-verma/rest-api-using-express
Express REST API: A lightweight REST API built with Express.js for CRUD operations on a database. Tested with Postman for reliability and flexibility in database management with Sequelize or MongoDB
https://github.com/prabal-verma/rest-api-using-express
Last synced: about 1 month ago
JSON representation
Express REST API: A lightweight REST API built with Express.js for CRUD operations on a database. Tested with Postman for reliability and flexibility in database management with Sequelize or MongoDB
- Host: GitHub
- URL: https://github.com/prabal-verma/rest-api-using-express
- Owner: Prabal-verma
- Created: 2024-03-25T16:56:20.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-06-02T19:25:45.000Z (7 months ago)
- Last Synced: 2024-06-02T21:16:44.143Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 125 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Express REST API
## Overview
This project is a REST API built using Express.js for handling CRUD (Create, Read, Update, Delete) operations on a database. It provides endpoints for managing resources, allowing clients to interact with the data using HTTP methods such as GET, POST, PUT, and DELETE. The API was tested using Postman, ensuring robust functionality and reliability.
## Features
- **CRUD Operations**: Supports Create, Read, Update, and Delete operations on resources.
- **Express Middleware**: Utilizes Express middleware for handling requests, parsing JSON, and error handling.
- **Database Integration**: Connects to a database to store and retrieve data using Sequelize or MongoDB, providing flexibility in database management.
- **Postman Testing**: Tested thoroughly using Postman to ensure API functionality and reliability.## Tech Stack
- **Express.js**: A fast, unopinionated, minimalist web framework for Node.js.
- **Sequelize or MongoDB**: Sequelize for SQL databases or MongoDB for NoSQL databases, providing database integration.
- **Postman**: A collaboration platform for API development used for testing and debugging API endpoints.## Installation
### Prerequisites
- Node.js installed on your machine
- Database management system (e.g., MySQL, PostgreSQL, MongoDB) installed and running### Clone the Repository
```bash
git clone https://github.com/Prabal-verma/rest-api-using-express.git
cd express-rest-api```
Testing with Postman
Open Postman.
Import the provided Postman collection for testing endpoints.
Test the API endpoints using various HTTP methods (GET, POST, PUT, DELETE).
API Endpoints
The API exposes the following endpoints:GET /resources: Retrieve all resources.
GET /resources/
: Retrieve a specific resource by ID.
POST /resources: Create a new resource.
PUT /resources/
: Update an existing resource by ID.
DELETE /resources/
: Delete a resource by ID.
Contributing
Contributions are welcome! Please fork this repository and submit a pull request with your improvements or new features.