This project allows you to create your own Content Delivery Network (CDN) service using MinIO and AWS S3 with the Go programming language. You can use this CDN service to upload, retrieve, and delete images.
Before you get started, make sure you have the following prerequisites installed on your computer:
- Docker: You will need Docker to run this project.
Follow these steps to set up and run the project:
1- Clone the repository:
git clone https://github.com/mstgnz/go-minio-cdn.git
2- Rename the .env.example file to .env and enter the required information. 3- Start the project with Docker Compose:
docker-compose up -d
Now, you can access the following services:
- MinIO: http://localhost:9001
- Go API: http://localhost:9090
You can find a Postman Collection for this project in the go-minio-cdn.postman_collection.json file.
- HTTP POST: http://localhost:9090/upload
- Headers:
- Authorization (from .env)
- Body (form-data):
KEY | VALUE |
---|---|
bucket | bucket name |
path | slider |
file | choose file |
- HTTP POST: http://localhost:9090/upload-with-aws
- Headers:
- Authorization (from .env)
- Body (form-data):
KEY | VALUE |
---|---|
bucket | bucket name |
path | slider |
file | choose file |
- HTTP DELETE: http://localhost:9090/delete
- Headers:
- Authorization (from .env)
- Body (form-data):
KEY | VALUE |
---|---|
bucket | bucket name |
object | object name |
- HTTP DELETE: http://localhost:9090/delete-with-aws
- Headers:
- Authorization (from .env)
- Body (form-data):
KEY | VALUE |
---|---|
bucket | bucket name |
object | object name |
This project is open-source, and contributions are welcome. Feel free to contribute or provide feedback of any kind.
This project is licensed under the Apache License. See the LICENSE file for more details.