https://github.com/theoribbi/express-rest-api
A REST API with Express. Using Swagger for documentation and Docker to deploy
https://github.com/theoribbi/express-rest-api
Last synced: 2 months ago
JSON representation
A REST API with Express. Using Swagger for documentation and Docker to deploy
- Host: GitHub
- URL: https://github.com/theoribbi/express-rest-api
- Owner: theoribbi
- Created: 2023-08-11T09:26:21.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-11T09:27:54.000Z (almost 2 years ago)
- Last Synced: 2025-02-14T10:25:40.540Z (4 months ago)
- Language: JavaScript
- Size: 41 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Express Rest API Swagger Base Project
A REST API with Express. Using Swagger for documentation and Docker to deploy
## API Reference
#### Base URL
```http
GET /api/v1
```#### Swagger URL
```http
GET /api-docs
```### Auth
#### Register```http
POST /api/v1/register
```#### Login
```http
POST /api/v1/login
```#### Logout
```http
POST /api/v1/logout
```### User
#### Get all user
```http
GET /api/v1/user
```#### Get user by ID
```http
GET /api/v1/user/:id
```| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `id` | `string` | **Required**. Id of item to fetch |#### Create user
```http
POST /api/v1/user
```#### Update user by ID
```http
PUT /api/v1/user/:id
```| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `id` | `string` | **Required**. Id of item to fetch |#### Delete user by ID
```http
DELETE /api/v1/user/:id
```| Parameter | Type | Description |
| :-------- | :------- | :-------------------------------- |
| `id` | `string` | **Required**. Id of item to fetch |## Installation
After cloning the project, make sure you have docker installed.
```bash
docker-compose up --build
http://localhost:3000/api-docs
```