Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

Preview

Starts a local web server for previewing production build

usage: sanity preview [BUILD_OUTPUT_DIR] [--port <port>] [--host <host>]

   Starts a local web server for previewing production build

Notes
  Changing the hostname or port number might require a new entry to the CORS-origins allow list.

Options
  --port <port> TCP port to start server on. [default: 3333]
  --host <host> The local network interface at which to listen. [default: "127.0.0.1"]

Examples
  sanity preview --host=0.0.0.0
  sanity preview --port=1942
  sanity preview some/build-output-dir

Was this article helpful?