Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abdelrahman0122/dockerize-restful-api
https://github.com/abdelrahman0122/dockerize-restful-api
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/abdelrahman0122/dockerize-restful-api
- Owner: Abdelrahman0122
- Created: 2023-05-25T10:13:36.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-05-25T10:13:40.000Z (over 1 year ago)
- Last Synced: 2024-10-11T18:26:15.836Z (about 1 month ago)
- Language: JavaScript
- Size: 66.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
Awesome Lists containing this project
README
# Dockerizing a RESTful API for Managing Person Objects
This is an example of how to Dockerize a simple RESTful API for managing person objects using Node.js and Express.js.
## Prerequisites
Before you can Dockerize this API, you need to have the following software installed on your local machine:
- Docker
## Getting Started
To get started, follow these steps:
1. Pull this repository to your local machine:
>> docker pull abdelrahman0122/project
2. Run the Docker container:
>> docker run -p 5000:5000 abdelrahman0122/project
This will start the API in a Docker container on `http://localhost:5000`.
## API Specification
The RESTful API have the following endpoints:
- GET /persons: Retrieve a list of all person objects.
- POST /persons: Create a new person object
- GET /persons/{id}: Retrieve a specific person object by its ID
- PATCH/persons/{id}: Update a specific person object by its ID
- DELETE /persons/{id}: Delete a specific person object by its ID.## Conclusion
Dockerizing a simple RESTful API for managing person objects using Node.js and Express.js is a straightforward process.
![alt text](image.png)