fastly compute serve

Build and run a Compute@Edge package locally.


$ fastly compute serve


--addrNo127.0.0.1:7676The IPv4 address and port to listen on
--envNoThe environment configuration to use (e.g. stage)
--fileNobin/main.wasmThe Wasm file to run
--include-sourceNoInclude source code in built package
--languageNoLanguage type
--package-nameNoPackage name
--skip-buildNoSkip the build step
--timeoutNoTimeout, in seconds, for the build compilation step
--viceroy-checkNoForce the CLI to check for a newer version of the Viceroy binary
--viceroy-pathNoThe path to a user installed version of the Viceroy binary
--watchNoWatch for file changes, then rebuild project and restart local server
--watch-dirNoThe directory to watch files from (can be relative or absolute). Defaults to current directory.

Global options

--helpNoShow context-sensitive help.
--accept-defaultsNoAccept default options for all interactive prompts apart from Yes/No confirmations
--auto-yesNoAnswer yes automatically to all Yes/No confirmations. This may suppress security warnings
--non-interactiveNoDo not prompt for user input - suitable for CI processes. Equivalent to --accept-defaults and --auto-yes
--profileNoSwitch account profile for single command execution (see also: 'fastly profile switch')
--quietNoSilence all output except direct command output. This won't prevent interactive prompts (see: --accept-defaults, --auto-yes, --non-interactive)
--tokenNoFastly API token (or via FASTLY_API_TOKEN)
--verboseNoVerbose logging


Build and run a Compute@Edge package locally

The compute serve command wraps the existing build command. All flags present on the fastly compute build command are available to use here. Additionally, the --watch command enables 'hot reloading' of your project code whenever changes are made to the source code.

$ fastly compute serve --watch