> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

# dev

> Start a local development server

Start a local development server that runs your project backend locally on your machine. When your project defines [`site.serveCommand`](/developers/backend/overview/project-structure) in `base44/config.jsonc`, `dev` also spawns your frontend dev server and manages both processes together.

Learn more about local development, including setup and supported features, in the [Local development](/developers/backend/overview/local-dev/local-development-overview) guide.

## Usage

```bash theme={null}
base44 dev
```

## Flags

| Flag                  | Description                                          |
| --------------------- | ---------------------------------------------------- |
| `-p, --port <number>` | Port for the development server. Defaults to `4400`. |

## Frontend dev server

If `site.serveCommand` is set in your project config, `dev` runs that command from the project root and:

* Injects `VITE_BASE44_APP_ID` (your app's id) and `VITE_BASE44_APP_BASE_URL` (the local backend URL) into the frontend process's environment, so the SDK auto-points at the local backend.
* Streams the frontend's output alongside the backend's, prefixed with `[backend]` and `[frontend]`.
* Shuts both processes down together when you press Ctrl-C, and tears the backend down if the frontend exits on its own.

If `site.serveCommand` is not set, `dev` runs only the backend and you can start your frontend in a separate terminal.

## See also

* [Local development](/developers/backend/overview/local-dev/local-development-overview): Setup and supported features
* [Project structure](/developers/backend/overview/project-structure): `site.serveCommand` and other config fields
* [`deploy`](/developers/references/cli/commands/deploy): Deploy all project resources to Base44
