![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
github.com/mich31/scoreplay-media-api
This project is an implementation of a REST API providing endpoints to manage media assets & tags. It provides the following functionalities:
This application has been implemented with Go and Fiber which is a famous framework for easily building REST APIs in Go.
It uses a PostgreSQL database. PostgreSQL is easy to use as a SQL database and handles well the logic of this application. Any other SQL database like MySQL or NoSQL like MongoDB could have been use in this case. This database includes 3 tables: media (media entities), tags (tag entities), media_tags(manage many-to-many association between medias and tags).
GORM manages interactions between the application and the database. This ORM library is easy to use and provides a straightforward documentation.
MinIO is used here as a storage service to manage & store media files created. It seems more relevant to use a dedicated storage service for media management than use a database for scalability, security and cost-effectiveness concerns. MinIO provides a pretty simple Go SDK, similar functionalities than Amazon S3 or any other famous cloud storage service (GCP, Azure Blob Storage), a WEBUI (available at http://127.0.0.1:9001
if you run it via a Docker) and an API (available at http://127.0.0.1:9000
if you run it via a Docker). You can find the credentials (MINIO_ROOT_USER
& MINIO_ROOT_PASSWORD
) in .env.example
file.
For simplicity and effectiveness, both the PostgreSQL database and MinIO will be run as Docker containers.
P.S: You may need to create an access key via MinIO WebUI (available at http://127.0.0.1:9000 if you run it via a Docker) if you get an error (The Access Key Id you provided does not exist in our records
) when running the application. This case is handled through the instructions set in the docker-compose.yaml
file.
cd scoreplay-media-api
.env.example
file and name it .env
:cp .env.example .env
docker compose up -d
go mod tidy
go build
./scoreplay-media-api
The service is running on http://localhost:3000
.
API documentation is available in docs/swagger.yaml
or http://localhost:3000/swagger
.
Run tests
go test ./...
POST /api/medias
endpoint. It depends on the product requirements but it could help to control resource consumption and service availability.FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.