Skip to content

Sample of using a context and various aggregates (single counters)

Notifications You must be signed in to change notification settings

tonyx/SharpinoCounter3

Repository files navigation

Sharpino Counter

Example of a Counter with Sharpino

Table of Contents

Prerequisites: dbmate, postgres (optional as can use in memory eventstore)

Installation

clone project

Run project using memory as event-store

then run the commands:

dbmate up

and run the following command:

dotnet run

Run project using postgres as event-store

Create a file named .env with content like this (substituting the postgresusername/postgrespassword with your own):

DATABASE_URL="postgres://postgresusername:[email protected]:5432/es_counter?sslmode=disable"

then uncomment the following line in the Tests.fs: // ((fun () -> SharpinoCounterApi (pgStorage, doNothingBroker, counterContextStorageStateViewer, counterAggregateStorageStateViewer)), pgStorage) and optionally comment out the following line in the Tests.fs: // ((fun () -> SharpinoCounterApi (memoryStorage, doNothingBroker, counterContextStorageStateViewer, counterAggregateStorageStateViewer)), memoryStorage)

then run the commands:

dbmate up

and run the following command:

dotnet run

A 6 min reading article about this example can be found here

About

Sample of using a context and various aggregates (single counters)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published