Pudu programming language
Menu
Package

@chrismichaelps / pudu-lang-docgen

Documentation publishing for Pudu: articles, API references, navigation, search, and static websites

0.1.0Apache-2.01

InstallClose

serve.md

Markdown32 lines876 B

GitHub ↗

serve


uid: guides.commands.serve description: Preview a built site over HTTP.


Serves a built site folder over HTTP until interrupted.

docgen serve [folder] [options]
ArgumentDescription
folderThe site folder to serve. Defaults to _site.
OptionDescription
-n, --hostname <host>The host to listen on. Defaults to localhost.
-p, --port <number>The port to listen on. Defaults to 8080.

A request for a folder serves its index.html. Addresses the site does not have receive the site's 404.html. Requests whose decoded path would leave the folder are refused.

Example

pudu run examples/Cli.pudu serve website/_site --port 8130

To rebuild while editing, use build with --serve --watch instead: serve only serves files that already exist.