[go: nahoru, domu]

Skip to content

zavalit/eventsourcing_rxjs_demo

Repository files navigation

Eventsourcing Demo App

The intention and concepts behind this app are descipbed in Lightweight Eventsourcing done by RxJS on Redis Streams

Setup

For the first bootsrap all persistance layers (redis, mongodb) that demo app needs to run, as well as redis commander for debugging:

docker-compose up -d

Run

start an app

npm install
npm run start

and send a few requests to see the results:

curl -X POST \
  http://localhost:8089/projects \
  -H 'Content-Type: application/json' \
  -d '{
	"project_uuid": "1234-1u2u-uuid",
	"project_name": "Project 1"
}'



curl -X PUT \
  http://localhost:8089/projects/1234-1u2u-uuid \
  -H 'Content-Type: application/json' \
  -d '{
	"project_name": "Project 1 (updated)"
}'


curl -X GET \
  http://localhost:8089/projects

Check persisting

You can use an redis-commander to take a look what and how was stored in redis. For that just open http://localhost:8091/ in your Browser

In order to check what was stored in mongodb, you can use MongoDB Compass. For connection use following credentials: mongodb://projector:projector@localhost:27027/

Releases

No releases published

Packages

No packages published