# Local app (/docs/local-development/app-development)

> For the complete Prisma documentation index, see [llms.txt](https://www.prisma.io/docs/llms.txt). A markdown version of any docs page is available by appending `.md` to its URL.

Run your app locally on the runtime Prisma Compute deploys, wire it to a local database, and bring up the whole app with Composer.

Location: Local Development > Local app

Building locally with Prisma is ordinary app development: you run your framework's dev server, query a database, and iterate. What the platform adds is parity: the pieces you develop against locally behave like the ones you deploy to.

## Compute runs Bun [#compute-runs-bun]

[Prisma Compute](https://www.prisma.io/docs/compute) runs deployed apps on [Bun](https://bun.com). There is no proprietary runtime layer to emulate locally: run your app with Bun on your machine and you are exercising the same runtime your deployment uses. Bun's built-in APIs, like [its S3 client](https://www.prisma.io/docs/local-development/storage), work identically in both places.

Day to day, iteration stays your framework's usual loop. A scaffolded [Prisma 8](https://www.prisma.io/docs/prisma-orm) app starts with:

  

#### bun

```bash
bun run dev
```

#### pnpm

```bash
pnpm run dev
```

#### yarn

```bash
yarn dev
```

#### npm

```bash
npm run dev
```

For a Bun-native server, run the entry file directly:

```bash
bun run src/index.ts
```

The [Bun runtime guide](https://www.prisma.io/docs/guides/runtimes/bun) walks through a full local build on Bun.

## Wire in a local database [#wire-in-a-local-database]

Point your app at a local Prisma Postgres instance instead of a hosted one. Start it from your project directory:

  

#### bun

```bash
bunx prisma dev
```

#### pnpm

```bash
pnpm dlx prisma dev
```

#### yarn

```bash
yarn dlx prisma dev
```

#### npm

```bash
npx prisma dev
```

It prints a `DATABASE_URL` you copy into `.env`; migrations and queries then run against your machine. [Local Postgres](https://www.prisma.io/docs/local-development/postgres) covers instances, background mode, and management commands.

This `.env` wiring is hand-wired configuration, and it belongs to the direct dev-server loop: when you deploy an app configured this way, you swap `DATABASE_URL` for a hosted [Prisma Postgres](https://www.prisma.io/docs/postgres) connection string, with no application code changes. A Composer app declares the wiring instead. The service depends on [`postgres()`](https://www.prisma.io/docs/composer/databases) and reads its connection string as `db.url` from `service.load()`, so the same declaration resolves to a local database under `dev` and a hosted one on deploy, and there is no variable to swap.

## Run the app with dev [#run-the-app-with-dev]

Apps deploy to Compute as [Prisma Composer](https://www.prisma.io/docs/composer) apps: you declare your services in TypeScript and `deploy` stands them up. The same declarations run locally. One command brings the whole app up, whether it is one service or several, with its databases and buckets wired together:

  

#### bun

```bash
bun run build
bunx prisma@latest dev module.ts
```

#### pnpm

```bash
pnpm run build
pnpm dlx prisma@latest dev module.ts
```

#### yarn

```bash
yarn build
yarn dlx prisma@latest dev module.ts
```

#### npm

```bash
npm run build
npx prisma@latest dev module.ts
```

`dev` runs the same pipeline a deploy runs, but against local emulators standing in for Prisma Compute and Prisma Postgres. No cloud credentials are involved, and the local databases and buckets persist between runs until you pass `--fresh`. When the app runs locally, [deploying it](https://www.prisma.io/docs/prisma-compute/deploy) is the same declarations against the hosted platform.

[Local development in Composer](https://www.prisma.io/docs/composer/local-development) documents the full workflow: warm restarts, log filtering, and what is local versus what is real.

## Next steps [#next-steps]

* [Local Postgres](https://www.prisma.io/docs/local-development/postgres): the local database in detail.
* [Local storage](https://www.prisma.io/docs/local-development/storage): S3-compatible clients against local and hosted buckets.
* [Deploy your first app](https://www.prisma.io/docs/prisma-compute/deploy): take the locally built app to a live URL.

## Related pages

- [`Local Postgres`](https://www.prisma.io/docs/local-development/postgres): Set up and use Prisma Postgres for local development
- [`Local storage`](https://www.prisma.io/docs/local-development/storage): Use S3-compatible client libraries against Prisma object storage, locally with stand-in buckets and deployed on Prisma Compute.