A practical walkthrough of implementing Event Sourcing in TypeScript and NodeJS using the Decider pattern. Covers defining union types for events, commands, and state; building an evolve function for state reconstruction via event reduction; implementing a decide function for business logic; and composing a full HTTP API with ExpressJS using curried command handlers, optimistic concurrency via ETags, and EventStoreDB as the event store.

15m read timeFrom event-driven.io
Post cover image
4 Impressions