Revela

Dev Server

The Serve plugin starts a local static HTTP server so you can preview your generated site during development. It serves the files in output/ as they are: it does not open a browser, watch your files, or live-reload pages.

Overview

โšก Instant Preview

Start a local server with a single command.

๐Ÿ” Request Logging

Verbose mode logs all HTTP requests for debugging.

๐Ÿ›‘ Graceful Shutdown

Press Ctrl+C to stop and return to the interactive menu.

Installation

The Standalone edition has Serve built in. In the Full edition, install it from the bundled packages:

revela plugin install Serve

With the .NET tool, first register a folder containing the release's .nupkg files (see Plugins).

Usage

# Start server (default: port 8080)
revela serve

# Custom port
revela serve --port 3000

# Verbose mode (log all requests)
revela serve --verbose

Then open http://localhost:8080 in your browser.

Press Ctrl+C to stop the server.

Configuration

Settings are stored in project.json below plugins.serve:

{
  "plugins": {
    "serve": {
      "port": 8080,
      "verbose": false
    }
  }
}
Option Default Description
port 8080 HTTP server port (1-65535)
verbose false Log all requests (not just errors)
# Configure interactively
revela config serve

# Or set a specific option
revela config serve --port 3000

Both commands also accept the short aliases -p (port) and -v (verbose). config serve writes project.json, so run it inside your project; in scripts and CI pass the options, because without a terminal it doesn't prompt and exits with 1. The settings can also be supplied as environment variables:

SPECTARA__REVELA__PLUGINS__SERVE__PORT=3000
SPECTARA__REVELA__PLUGINS__SERVE__VERBOSE=true

Values are resolved in order: CLI arguments โ†’ environment variables โ†’ project.json โ†’ revela.json โ†’ defaults.

Output

Standard mode โ€“ only shows errors:

๐ŸŒ Serving /home/jane/portfolio/output at http://localhost:8080
   Press Ctrl+C to stop

โš  404: /favicon.ico

Verbose mode โ€“ logs every request:

๐ŸŒ Serving /home/jane/portfolio/output at http://localhost:8080
   Press Ctrl+C to stop

GET /index.html 200
GET /_assets/main.css 200
GET /images/galleries/vacation/beach/640.avif 200
โš  404: /favicon.ico

Typical Workflow

# 1. Generate your site
revela generate all

# 2. Preview locally
revela serve

# 3. Make changes, regenerate, refresh browser
revela generate all
revela serve

Features