Skip to content

deltabase dev

Start local development environment

Start a local DeltaBase development environment with hot reloading.

Terminal window
deltabase dev [options]

Or without global installation:

Terminal window
pnpx @delta-base/cli dev

Running deltabase dev starts two services:

ServiceURLDescription
API Serverhttp://localhost:8787DeltaBase event store API
Studio UIhttp://localhost:3000Visual management interface

┌────────────────────────────────────────────────────────────────────────────┐
│ │
│ ┌──────────────────────────────────────────────────────────────────────┐ │
│ │██████╗ ███████╗██╗ ████████╗ █████╗ ██████╗ █████╗ ███████╗███████╗│ │
│ │██╔══██╗██╔════╝██║ ╚══██╔══╝██╔══██╗██╔══██╗██╔══██╗██╔════╝██╔════╝│ │
│ │██║ ██║█████╗ ██║ ██║ ███████║██████╔╝███████║███████╗█████╗ │ │
│ │██║ ██║██╔══╝ ██║ ██║ ██╔══██║██╔══██╗██╔══██║╚════██║██╔══╝ │ │
│ │██████╔╝███████╗███████╗██║ ██║ ██║██████╔╝██║ ██║███████║███████╗│ │
│ │╚═════╝ ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝╚══════╝│ │
│ └──────────────────────────────────────────────────────────────────────┘ │
│ │
│ Deltabase development environment is ready! │
│ │
│ API Server: http://localhost:8787 │
│ Studio UI: http://localhost:3000 │
│ │
└────────────────────────────────────────────────────────────────────────────┘

The local environment provides a fully functional event store:

  • Create and manage event stores
  • Append and read events
  • WebSocket subscriptions
  • All API endpoints

Visual interface for development:

  • Browse event stores
  • View streams and events
  • Inspect event payloads
  • Monitor subscriptions

Changes to your code are automatically detected and the server reloads.

Events are stored in a local SQLite database. Data persists between restarts.


Point your application to the local API:

import { DeltaBase } from '@delta-base/server';
const deltabase = new DeltaBase({
baseUrl: 'http://localhost:8787', // Local development
// No API key needed for local dev
});
const eventStore = deltabase.getEventStore('my-events');

Create event stores via the SDK:

const management = deltabase.getManagementClient();
await management.createEventStore({
name: 'my-events',
description: 'Development event store',
});

Or via the Studio UI at http://localhost:3000.


  1. Start DeltaBase:

    Terminal window
    pnpx @delta-base/cli dev
  2. Create an event store via Studio or SDK

  3. Run your application pointing to localhost:8787

  4. View events in Studio at localhost:3000

  5. Iterate - changes auto-reload


FeatureLocal DevProduction
AuthenticationNone requiredAPI key required
StorageSQLiteCloudflare Durable Objects
URLlocalhost:8787api.delta-base.com
WebhooksLocal onlyPublic URLs required

If port 8787 or 3000 is in use:

Terminal window
# Find and kill the process using the port
lsof -i :8787
kill -9 <PID>

Ensure DeltaBase is running:

Terminal window
pnpx @delta-base/cli dev

Check that your app is pointing to http://localhost:8787.