hyperctl server command

Overview


The hyperctl server command performs a full website build and serves the resulting build output over HTTP.

Usage


 1 $ hyperctl server -h
 2Run a local HTTP server.
 3
 4Usage:
 5        hyperctl server [options] [content]
 6
 7Options:
 8        -c, --config       Path to the website configuration file. (required) (env: HYPER_CONFIG)
 9        -i, --id           Build ID. (env: HYPER_BUILD_ID) (default: 57f75fcc-afd0-4ee6-bbca-05dbcc4417aa)
10        -I, --interval     Live reload interval seconds. (env: HYPER_REFRESH) (default: 2)
11        -H, --host         Development server host. (env: HYPER_HOST) (default: localhost)
12        -P, --port         Development server port. (env: HYPER_PORT) (default: 8080)
13            --content-dir  Relative path to the content directory to use for the build (overwrites site.config.content_dir). (env: HYPER_CONTENT_DIR)
14            --data-dir     Relative path to the data directory to use for the build (overwrites site.config.data_dir). (env: HYPER_DATA_DIR)
15            --static-dir   Relative path to the static directory to use for the build (overwrites site.config.static_dir). (env: HYPER_STATIC_DIR)
16            --theme        Relative path to theme config to use for the build (overwrites site.config.theme). (env: HYPER_THEME)
17        -h, --help         Display help information.

Options


-c, --config
Path to the website configuration file (site.yaml or site.json).

Defaults to the HYPER_CONFIG environment variable, if set.

To configure a default, use the export command.

1export HYPER_CONFIG="site.yaml"
-i, --id
The identifier to use for the build.

Defaults to a randomly generated UUIDv4 string.

WARNING: providing a --id can cause hyperctl build to overwite an existing build. This can be useful in some cases (e.g. when using an external HTTP server to serve a specific build). In most cases it is unecessary to provide a --id, and in some cases it can cause confusion.

-I, --interval
The development server refresh interval, in seconds.

The default --interval is 2 seconds.

-H, --host
The development server hostname.

The default --host is 127.0.0.1.

-P, --port
The path to the data file to use for the render.

The default --port is 8080.

--content-dir
Relative path to the content directory to use for the build (overwrites site.config.content_dir). Uses the HYPER_CONTENT_DIR environment variable as a default value, if set.

NEW! the --content-dir flag is available in hyperctl version 0.17.0 and later.

--data-dir
Relative path to the data directory to use for the build (overwrites site.config.data_dir). Uses the HYPER_DATA_DIR environment variable as a default value, if set.

NEW! the --data-dir flag is available in hyperctl version 0.17.0 and later.

--static-dir
Relative path to the static directory to use for the build (overwrites site.config.static_dir). Uses the HYPER_STATIC_DIR environment variable as a default value, if set.

NEW! the --static-dir flag is available in hyperctl version 0.17.0 and later.

--theme
Relative path to theme config to use for the build (overwrites site.config.theme). Uses the HYPER_THEME environment variable as a default value, if set.

NEW! the --theme flag is available in hyperctl version 0.17.0 and later.

💬 Join the community

Stay up-to-date with the latest releases and other news from the Team behind HyperTemplates. Ask the developers questions, get help from the community, and share your creations! 🎨