serve
runbooks serve
Section titled “runbooks serve”Starts the backend API server without opening the browser. This command is useful for local development.
runbooks serve <path-to-runbook> [flags]
Arguments
Section titled “Arguments”<path-to-runbook>
- Path to therunbook.mdx
file
--output-path <path>
- Directory where generated files will be written (default:generated
)- Can be relative (e.g.,
./output
) or absolute (e.g.,/tmp/generated
) - Relative paths are resolved from the current working directory
- Can be relative (e.g.,
When To Use It
Section titled “When To Use It”Use runbooks serve
when you want to start the backend API server without opening the browser. This command is intended for developers working on the Runbooks tool itself.
What It Does
Section titled “What It Does”When you run runbooks serve
:
- Starts the Backend Server - Launches a Go-based HTTP server on port 7825
- Serves the API - Provides REST endpoints for the frontend to call
- Does NOT Open Browser - You must manually navigate to
http://localhost:7825
or run the frontend separately
Technical Details
Section titled “Technical Details”The server runs on port 7825 by default (not currently configurable via flags).
The server is configured to allow CORS requests from the Vite dev server during development.
Frontend Assets
Section titled “Frontend Assets”In production, the server serves the compiled React app from the /web/dist
directory. During development, you typically run Vite separately on port 5173.
Development Workflow
Section titled “Development Workflow”A typical development workflow:
-
Start the backend:
Terminal window runbooks serve ./testdata/demo-runbook-1/runbook.mdxOr if you want to easily re-compile the backend:
Terminal window go run main.go serve ./testdata/demo-runbook-1/runbook.mdx -
In another terminal, start the frontend:
Terminal window cd webbun dev -
Open your browser to
http://localhost:5173
(Vite’s port) -
Make changes to:
- React code in
/web/src
- hot reloads automatically - Go code - restart the
serve
command - Runbook files - refresh the browser
- React code in
See Also
Section titled “See Also”runbooks open
- The command for regular runbook usage