Skip to content

Local dev

Terminal window
layer dev [project] [options]

layer dev serves the backend on the CLI host and port. The default URL is http://localhost:8787, and --host or --port changes that local origin.

Keep backend({ endpoint }) pointed at the deployed URL while debugging locally. Layeron reads the endpoint path and adds it to local routes automatically. The endpoint host remains deploy ingress metadata. For endpoint: "https://api.example.com/v1" and app.get("/api/health"), the local request URL is http://localhost:8787/v1/api/health when the dev server uses port 8787.

OptionValueNotes
--env<name>Defaults to dev.
--port<number>Defaults to 8787; valid range is 1 through 65535.
--host<address>Local listen address.
--secret-file<path>Defaults to .dev.vars.
--show-routesShow route rows in the resource summary.
-h, --helpShow help.