mirror of
https://github.com/SamyRai/tercul-backend.git
synced 2025-12-27 04:01:34 +00:00
Refactored the API server setup to improve modularity and simplify the main application entry point. - Created a new `NewAPIServer` function in `cmd/api/server.go` that encapsulates the creation and configuration of the `http.ServeMux`. - This new function now handles the registration of all API routes, including the GraphQL endpoint (`/query`), the GraphQL Playground (`/playground`), and the Prometheus metrics endpoint (`/metrics`). - Simplified `cmd/api/main.go` by removing the manual `ServeMux` creation and instead calling the new `NewAPIServer` function. - This change makes the `main` function cleaner and more focused on its core responsibilities of application initialization and graceful shutdown. |
||
|---|---|---|
| .. | ||
| api | ||
| tools | ||
| worker | ||