Skip to content

Golang Advanced

Hub › Golang › Advanced

What you'll build

You upgrade the SQLite-backed CRUD API from Intermediate into a production-ready REST service with PostgreSQL, JWT authentication, HTTP middleware, Docker deployment, integration tests, and CI/CD. By the end you have a containerized API running against PostgreSQL with auth, rate limiting, graceful shutdown, and benchmarks.

Prerequisites

The ladder

  1. 01 Why PostgreSQL — SQLite limits in production
  2. 02 Migrate to PostgreSQL — pgx, connection pool, schema
  3. 03 HTTP middleware — logging, request ID, recovery
  4. 04 JWT auth middleware — sign and verify tokens
  5. 05 Rate limiting — per-IP token bucket
  6. 06 Docker multistage — Dockerfile + docker-compose with Postgres
  7. 07 Integration tests — Testcontainers for Postgres
  8. 08 Benchmarks and profiling — pprof, benchmarks
  9. 09 Graceful shutdown — signal handling, context cancel
  10. 10 CI/CD GitHub Actions — lint, test, build, push, deploy

Start01 Why PostgreSQL