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
- Complete the Intermediate tier (SQLite CRUD /items API)
- Docker installed (
docker --version) — see the Docker appendix if you're new to Docker - Go 1.22+
The ladder
- 01 Why PostgreSQL — SQLite limits in production
- 02 Migrate to PostgreSQL — pgx, connection pool, schema
- 03 HTTP middleware — logging, request ID, recovery
- 04 JWT auth middleware — sign and verify tokens
- 05 Rate limiting — per-IP token bucket
- 06 Docker multistage — Dockerfile + docker-compose with Postgres
- 07 Integration tests — Testcontainers for Postgres
- 08 Benchmarks and profiling — pprof, benchmarks
- 09 Graceful shutdown — signal handling, context cancel
- 10 CI/CD GitHub Actions — lint, test, build, push, deploy
Start → 01 Why PostgreSQL