fastify-cli
Version:
Run a fastify route with one command!
64 lines (44 loc) • 1.38 kB
Plain Text
Usage: fastify start [opts] <file> [--] [<plugin-options>]
OPTS
-p, --port
[env: FASTIFY_PORT or PORT]
Port to listen on (default to 3000)
-a, --address
[env: FASTIFY_ADDRESS]
Address to listen on
-s, --socket
[env: FASTIFY_SOCKET]
Socket to listen on
-l, --log-level
[env: FASTIFY_LOG_LEVEL]
Log level (default to fatal)
-r, --require
[env: FASTIFY_REQUIRE]
Module to preload
-L, --logging-module
[env: FASTIFY_LOGGING_MODULE]
Path to logging configuration module to use
-P, --pretty-logs
[env: FASTIFY_PRETTY_LOGS]
Prints pretty logs
-o, --options
[env: FASTIFY_OPTIONS]
Use custom options
-w, --watch
[env: FASTIFY_WATCH]
Watch process.cwd() directory for changes, recursively; when that happens, the process will auto reload.
-x, --prefix
[env: FASTIFY_PREFIX]
Set the prefix
--body-limit
[env: FASTIFY_BODY_LIMIT]
Defines the maximum payload, in bytes, the server is allowed to accept
-T, --plugin-timeout
The maximum amount of time that a plugin can take to load (default to 10 seconds).
-h, --help
Show this help message
Examples:
start plugin.js on port 8080
fastify start -p 8080 plugin.js
start plugin.js passing custom options to it
fastify start plugin.js -- --custom-plugin-option-1 --custom-plugin-option-2