Running EventSourcingDB¶
EventSourcingKit stores your events in EventSourcingDB, so you need a running instance before you can store or read anything. For local development, the quickest way to start one is with Docker.
Prerequisites
You need Docker installed and running. EventSourcingDB is a single container with no external dependencies.
Starting a Local Instance¶
Run EventSourcingDB with Docker:
docker run --rm -p 3000:3000 thenativeweb/eventsourcingdb:1.2.0 \
run \
--api-token=secret \
--http-port=3000 \
--data-directory-temporary \
--http-enabled \
--https-enabled=false \
--with-ui
This starts EventSourcingDB on http://localhost:3000, protected by the API token secret. The --data-directory-temporary flag keeps all data in memory, so the store starts empty every time – ideal for experimenting, but not for production.
You now have the two pieces of connection information that EventSourcingKit needs: the base URL and the API token. You wire them up in Registering EventSourcingKit.
Verify it is running
The --with-ui flag enables EventSourcingDB's built-in UI. Open http://localhost:3000 in your browser to browse events as you store them.
For More Information¶
EventSourcingDB has its own documentation covering configuration, persistence, and production deployment.
- The EventSourcingDB documentation is the authoritative source for running and operating the database.
- Defining Events is the next step once your instance is up.