serve
Serve the generated static site locally.
./ritual serve [options]Options
Section titled “Options”| Option | Description | Default |
|---|---|---|
-p, --port <number> | Port to serve on | 3000 |
Examples
Section titled “Examples”Serve on default port (3000):
./ritual serveServe on a custom port:
./ritual serve --port 8080Typical Workflow
Section titled “Typical Workflow”- Build the site:
./ritual build-site- Serve it:
./ritual serve- Open http://localhost:3000 in your browser
- The serve command serves files from the
dist/directory - Make sure to run
build-sitefirst to generate the content - Press
Ctrl+Cto stop the server - To build and serve in one step, use
serve-siteinstead