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

https://github.com/shreyansh301/rest-api

This is a simple REST API built using Express.js for managing users. It supports basic CRUD operations (Create, Read, Update, Delete) and stores data in a JSON file (MOCK_DATA.json).
https://github.com/shreyansh301/rest-api

crud delete express-js get patch post rest-api

Last synced: about 2 months ago
JSON representation

This is a simple REST API built using Express.js for managing users. It supports basic CRUD operations (Create, Read, Update, Delete) and stores data in a JSON file (MOCK_DATA.json).

Awesome Lists containing this project

README

          

# Express REST API for User Management

REST API built using Express.js for managing users. It supports basic CRUD operations (Create, Read, Update, Delete) and stores data in a JSON file (MOCK_DATA.json).

## Features
- Get all users: Retrieve a list of all users.
- Get a single user: Retrieve details of a specific user by ID.
- Create a new user: Add a new user.
- Delete a user: Remove a user from the database by ID.
- Update a user: Modify details of an existing user by ID.

## Technologies Used
Node.js: Runtime environment.

Express.js: Web framework for building the API.

JSON: Data storage format.

## API Endpoints
### Method: GET
Get All Users
```
URL: /api/users
```
Get a Single User
```
/api/users/:id
```
### Screenshots
nodemon_started
GET
GET user by id

### Method: POST
Create a New User
```
/api/users
```
### Screenshots
POST
POST_Updated

### Method: DELETE
```
URL: /api/users/:id
```
### Screenshots
DELETE
1002_deleted

### Method: PATCH (Update a User)
```
URL: /api/users/:id
```
### Screenshots
PATCH
1003_updated

## Contributing
If you'd like to contribute to this project, feel free to fork the repository and submit a pull request.