shiroa

CLI Serve Command

The serve command is used to preview a book by serving it via HTTP at 127.0.0.1:25520127.0.0.1:25520 by default:

shiroa serve
shiroa serve

Note: The serveserve command is for testing a book’s HTML output, and is not intended to be a complete HTTP server for a website.

Specify a directory

The serveserve command can take a directory as an argument to use as the book’s root instead of the current working directory.

shiroa serve path/to/book
shiroa serve path/to/book

Build options

The serveserve command will build your book once before serving the content. It is hence including all of the options from buildbuild command.

--no-build

Use --no-build--no-build to serve the output directory without building first.

shiroa serve --no-build
shiroa serve --no-build

Server options

The serveserve address defaults to 127.0.0.1:25520127.0.0.1:25520. You can change it with --addr--addr:

shiroa serve path/to/book --addr 127.0.0.1:8000
shiroa serve path/to/book --addr 127.0.0.1:8000