Prompt file imported from kuon-bui/manga-go (
.github/prompts/run-dev.prompt.md). Copyright stays with the author.
Khởi động môi trường dev cho dự án manga-go theo các bước sau:
Bước 1 — Kiểm tra infrastructure
Đảm bảo Docker services đang chạy (PostgreSQL, Redis, Jaeger, Mailpit):
docker compose ps
Nếu chưa chạy, khởi động:
docker compose up -d
Bước 2 — Kiểm tra migration
sql-migrate status -config=configs/dbconfig.yml
Nếu có migration chưa apply:
sql-migrate up -config=configs/dbconfig.yml
Bước 3 — Kiểm tra build
go build ./...
Sửa lỗi compile nếu có.
Bước 4 — Khởi động API server với live reload
air -c api.air.toml
Bước 5 — (Tùy chọn) Khởi động queue worker
Nếu cần xử lý async tasks (email, background jobs):
go run cmd/queue/main.go
URLs hữu ích
| Service | URL |
|---|---|
| API server | http://localhost:8080 |
| pgAdmin | http://localhost:8081 |
| Asynqmon (queue monitor) | http://localhost:8091 |
| Mailpit (mail UI) | http://localhost:8025 |
| Jaeger (tracing) | http://localhost:16686 |