shiroa

CLI Serve Command

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


                                
shiroa serve

                                
shiroa serve

                                
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

                                
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.

Server options

The serveserve address defaults to localhost:25520localhost:25520. Either option can be specified on the command line:


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

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

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

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

–open

When you use the --open--open flag, shiroa will open the rendered book in your default web browser after building it.