Skip to content

serve docs

serve - Start server for a module's build output

The serve command starts a Docker container to serve a module's build output. For site-type modules (like docs), serves the HTML site. For PDF-type modules (like books), serves the PDF directory listing. Takes a module moniker as argument (e.g., docs, books).

Flags

Flag Description
--no-browser (default: false) Don't open browser after starting server
-p, --port (default: 9000) Port number for server (auto-allocated from 9000-9999 if not specified)
--stop (default: false) Stop the running server
--reload (default: false) Force reload (auto-detects container config changes)
--debug (default: false) Enable debug logging
--rebuild (default: false) Force rebuild before serving
-b, --book Named book to serve (defaults to first 'site' book, or first book if no site)

Workflow

When working on documentation:

  1. Start the server: r2r eac serve docs
  2. Make changes to markdown files in docs/
  3. Reload to see changes: r2r eac serve docs --reload

Port Management

The server auto-allocates ports in the 9000-9999 range. For a specific port:

r2r eac serve docs --port 9725

See Also


Tutorials | How-to Guides | Explanation | Reference

You are here: Reference — information-oriented technical descriptions of the system.