Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 719 Bytes

readme.md

File metadata and controls

24 lines (17 loc) · 719 Bytes

Music Library API

Stack: Golang + Postgres + Docker + Swagger

How to run

Configuration:

Run locally:

go run cmd/main.go --config=config/dev.yml

Run in Docker:

docker compose up --build

How Pagination Works

This project uses cursor pagination. Compared to indexed pagination, this method is faster, reduces database load, and decreases response time.

The OFFSET instruction is costly because, in a large database, it requires iterating through many records, increasing response time. This is mitigated by using ORDER BY id > cursor_id.