Skip to content

Dev Options

The dev block configures the development server's host and port. The networking layer (HTTPS, proxy, CORS, SPA fallback, base) lives separately in server.

ts
import { defineConfig } from "vantris";

export default defineConfig({
  dev: {
    port: 3000,
    host: "localhost",
  },
});

dev.port

  • Type: number
  • Default: 3000

Port the dev server listens on.

ts
export default defineConfig({ dev: { port: 5173 } });

If the port is already in use, vantris dev fails fast with a clear address-in-use error.

dev.host

  • Type: string
  • Default: "localhost"

Host the dev server binds to. localhost is reachable only from your machine. Bind to a shared address to expose the server on your network.

ts
export default defineConfig({ dev: { host: "0.0.0.0" } });

The --host CLI flag overrides this at runtime:

bash
vantris dev --host          # all interfaces (0.0.0.0)
vantris dev --host 0.0.0.0

When bound to a non-localhost address, both a Local and a Network URL are printed on start. See The CLI → --host.

Notes

  • dev intentionally holds only host/port. Everything else about the dev server's networking is in server — this split keeps the two concerns clear.
  • These options affect vantris dev only. The preview server has its own preview host/port.

Released under the MIT License.