https://github.com/zavalit/eventsourcing_rxjs_demo
Eventsourcing Demo App
https://github.com/zavalit/eventsourcing_rxjs_demo
eventsourcing redis rxjs
Last synced: about 1 year ago
JSON representation
Eventsourcing Demo App
- Host: GitHub
- URL: https://github.com/zavalit/eventsourcing_rxjs_demo
- Owner: zavalit
- Created: 2020-06-07T09:51:08.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-13T00:23:04.000Z (over 3 years ago)
- Last Synced: 2023-08-04T14:22:13.672Z (almost 3 years ago)
- Topics: eventsourcing, redis, rxjs
- Language: TypeScript
- Homepage:
- Size: 127 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Eventsourcing Demo App
The intention and concepts behind this app are descipbed in [Lightweight Eventsourcing done by RxJS on Redis Streams](https://medium.com/@zavalit/lightweight-eventsourcing-done-by-rxjs-on-redis-streams-28ce706991b2)
## Setup
For the first bootsrap all persistance layers (redis, mongodb) that demo app needs to run, as well as `redis commander` for debugging:
```sh
docker-compose up -d
```
## Run
start an app
```sh
npm install
npm run start
````
and send a few requests to see the results:
```sh
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](https://www.mongodb.com/download-center/compass). For connection use following credentials: `mongodb://projector:projector@localhost:27027/`