web

package
v0.0.4-beta.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package web serves the interactive code-graph visualisation UI.

The server exposes:

GET /         → embedded single-page HTML/JS application
GET /api/graph → JSON: {nodes, edges} for the force-directed graph
GET /api/stats → JSON: {files, entities, dependencies, relations}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server wraps an Indexer and serves the web UI.

func New

func New(idx *indexer.Indexer, version string) *Server

New creates a new web Server backed by the given Indexer.

func (*Server) Listen

func (s *Server) Listen(addr string) error

Listen starts the HTTP server on addr (e.g. ":8080") with graceful shutdown on SIGINT or SIGTERM.

func (*Server) Routes

func (s *Server) Routes(mux *http.ServeMux)

Routes registers all web UI routes on mux. Use this to mount the web UI on a shared mux (e.g. alongside MCP).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL