Skip to content

Getting Started

Use nubo serve to start an HTTP server.

Terminal window
nubo serve <file|folder>

A folder is treated as a routed server application.

Terminal window
nubo serve app

Example structure:

app/
index.nubo
about.nubo
users/
[id].nubo

When you serve one file, every request runs that file.

Terminal window
nubo serve app/index.nubo

This is useful for tiny apps, prototypes, and single-entry HTTP handlers.

By default, the server uses the configured address.

runtime:
server:
address: ":3000"

You can override it with --addr.

Terminal window
nubo serve app --addr ":8080"

When the server starts, it prints the Nubo web version, address, mode, and log level.

Nubo Web - <version>
Server listening on :3000
Mode: DEV | LogLevel: debug
Press Ctrl+C to quit

Use --dev to run in development mode.

Terminal window
nubo serve app --dev

In development mode, the router is reloaded on each request when serving a directory. This makes route changes visible without restarting the server.

For an executable .nubo route, Nubo:

  1. Matches the request path to a file.
  2. Parses or loads cached nodes for the file.
  3. Creates a runtime for the request.
  4. Provides @server/request.
  5. Provides @server/response.
  6. Interprets the matched .nubo file.
  7. Syncs the response to the HTTP client.