Autoscaling Report: Production databases on Neon use 2.4x less compute and 50% less cost than if they were running on a provisioned platform.
/CLI/dev

Neon CLI command: dev

Run Neon Functions locally with a dev server

Private Preview

This feature is in private preview: it's not ready for production use, and it may be briefly unavailable as we deploy updates. To get access, sign up here.

The dev command runs Neon Functions locally with a dev server and hot reload. Serve one function from its entry module, or every function declared in your neon.ts policy.

Usage

neon dev [--source <path>] [options]

Options

OptionDescriptionTypeDefaultRequired
--portPort to listen on (single-function mode only, with --source). Fails if taken. Without it (and without a PORT env var) a free port is chosen automatically.numberNo
--sourcePath to a single function entry module. Omit to serve every function declared in neon.ts.stringNo

Examples

Serve one function on a free port with hot reload:

neon dev --source ./functions/hello.ts

Serve every function declared in neon.ts (one dev server each):

neon dev

Serve one function on an explicit port (fails if the port is taken):

neon dev --source ./functions/hello.ts --port 3000
Was this page helpful?
Edit on GitHub

On this page

Copy neon init command