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.
You will need:
By default, the project will start services on ports 2113 and 3000.
Start up Kurrent via Docker:
docker-compose upYou should be able to see the Kurrent UI at:
http://localhost:2113/ui/cluster
Install dependencies:
npm installStart the API:
npm run startYou 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.
For a more modern (but work in progress) interface to Kurrent, install Kurrent Navigator.
Use this connection string: esdb://localhost:2113?tls=false
To build the application:
docker-compose --profile app buildRun the application:
docker-compose --profile app upRun the tests with:
npm run test