Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/douaaaaa/rest-api
A REST API built with Node JS and Express
https://github.com/douaaaaa/rest-api
api-rest expressjs javascript nodejs
Last synced: 8 days ago
JSON representation
A REST API built with Node JS and Express
- Host: GitHub
- URL: https://github.com/douaaaaa/rest-api
- Owner: douaaaaa
- Created: 2024-07-30T09:31:11.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-07-30T10:56:24.000Z (4 months ago)
- Last Synced: 2024-07-30T15:03:32.378Z (4 months ago)
- Topics: api-rest, expressjs, javascript, nodejs
- Language: JavaScript
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node.js Express REST API
This repository contains a RESTful API created using Node.js and Express.
## Prerequisites
Before you begin, ensure you have met the following requirements:
- Node.js installed on your local machine
- npm or yarn package manager installed## Get started
To install the dependencies and run the API, follow these steps:
1. Clone this repository to your local machine:
```
git clone https://github.com/douaaaaa/REST-API
```2. Navigate to the project directory:
```
cd REST_API
```3. Install dependencies using npm or yarn:
```
npm install express uuid dotenv
```4. Start the server:
```
npm run dev
```The server will start running at http://localhost:8000 by default.
## API Endpoints
- GET /users: Get all users or limited number of them using the query parameter "limit"
- GET /users/:id: Get a specific user using thier unique id
- POST /users: Create a new user
- DELETE /users/:id: Delete a specific user using their unique id
- PATCH /users/:id: Update user's data who is specified by their id (Partial Update)## Usage
This API was developed primarily for learning purposes to deepen my understanding of backend web development using Node.js and Express. Below are examples demonstrating how to interact with the API endpoints. These examples showcase basic CRUD operations and illustrate how data can be retrieved, created, updated, and deleted through HTTP requests. Feel free to explore and modify the endpoints to see how they interact with different data and responses. As this project evolves, additional functionalities and improvements may be added based on continued learning and experimentation with Node.js and web APIs.
## Contributing
1. Fork the repository
2. Create a new branch```
git checkout -b feature
```3. Make your changes
4. Commit your changes```
git commit -am 'Add feature'
```5. Push to the branch
```
git push origin feature
```6. Create a new Pull Request