Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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.