mirror of
https://github.com/SamyRai/tercul-backend.git
synced 2025-12-27 00:31:35 +00:00
This commit refactors the API server startup logic in `cmd/api/main.go` to simplify the application's architecture. Key changes: - Consolidates the three separate HTTP servers (GraphQL API, GraphQL Playground, and Prometheus metrics) into a single `http.Server` instance. - Uses a single `http.ServeMux` to route requests to the appropriate handlers on distinct paths (`/query`, `/playground`, `/metrics`). - Removes the now-redundant `PlaygroundPort` from the application's configuration. This change simplifies the server startup and shutdown logic, reduces resource usage, and makes the application's entry point cleaner and easier to maintain. |
||
|---|---|---|
| .github/workflows | ||
| api | ||
| cmd | ||
| content/blog | ||
| deploy | ||
| internal | ||
| ops | ||
| pkg/linguistics | ||
| schemas | ||
| test | ||
| .air.toml | ||
| .gitignore | ||
| .tool-versions | ||
| AGENTS.md | ||
| docker-compose.yml | ||
| Dockerfile | ||
| Dockerfile.dev | ||
| go.mod | ||
| go.sum | ||
| gqlgen.yml | ||
| Makefile | ||
| refactor.md | ||
| requirements.txt | ||
| TASKS.md | ||
| tools.go | ||