Skip to content

xolvio/kurrent-emmett-example

Repository files navigation

Event Sourcing With Kurrent and Emmett

Kurrent is an event store (and a whole lot more).

Emmett is an event sourcing framework for Node.js.

This project is derived from a sample the Emmett repo:

https://github.com/event-driven-io/emmett/tree/main/samples/webApi/expressjs-with-esdb

This project demonstrates how to build an event sourced application using Emmett to store events in Kurrent.

Prerequisities

You will need:

By default, the project will start services on ports 2113 and 3000.

Quick Start

Start up Kurrent via Docker:

docker-compose up

You should be able to see the Kurrent UI at:

http://localhost:2113/ui/cluster

Install dependencies:

npm install

Start the API:

npm run start

You should be able to talk to the API at:

http://localhost:3000/ (this will give you an error)

The .http file provides examples for how to interact with the API.

Calls can be generated directly in Vscode using the REST Client plugin.

Kurrent Navigator

For a more modern (but work in progress) interface to Kurrent, install Kurrent Navigator.

Use this connection string: esdb://localhost:2113?tls=false

image

Run the API in Docker

To build the application:

docker-compose --profile app build

Run the application:

docker-compose --profile app up

Testing

Run the tests with:

npm run test

About

Example of working with Kurrent and Emmett.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published