Skip to content

Serve

The serve command starts an HTTP server for a Nubo file or folder.

Terminal window
nubo serve <file|folder>
Terminal window
nubo serve <file|folder> [flags]
FlagDefaultDescription
--addr string@defaultAddress to listen on.

By default, --addr is @default.

Terminal window
nubo serve src

When @default is used, Nubo reads the address from the configuration file:

runtime:
server:
address: ":3000"

To override the address:

Terminal window
nubo serve src --addr ":8080"
Terminal window
nubo serve main.nubo
Terminal window
nubo serve src

The command accepts only one file or folder.

If more than one argument is provided, Nubo prints:

Only one folder or file can be served

If no file or folder is provided, Nubo prints the command help.

Terminal window
nubo serve