MCPcopy Create free account
hub / github.com/dan-v/lambda-nat-proxy / setupRoutes

Method setupRoutes

internal/dashboard/api.go:46–56  ·  view source on GitHub ↗

setupRoutes configures all API routes

()

Source from the content-addressed store, hash-verified

44
45// setupRoutes configures all API routes
46func (ds *DashboardServer) setupRoutes() {
47 // API endpoints
48 ds.mux.HandleFunc("/api/dashboard", ds.handleDashboardData)
49 ds.mux.HandleFunc("/api/connections", ds.handleConnections)
50 ds.mux.HandleFunc("/api/sessions", ds.handleSessions)
51 ds.mux.HandleFunc("/api/destinations", ds.handleDestinations)
52 ds.mux.HandleFunc("/ws", ds.handleWebSocket)
53
54 // Static files - we'll serve our React app here
55 ds.mux.HandleFunc("/", ds.handleStaticFiles)
56}
57
58// ServeHTTP implements the http.Handler interface
59func (ds *DashboardServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {

Callers 1

NewDashboardServerFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected