Event Sourcing in Typescript
This repo its a demo to test implementations of hollywood-js in a pseudo real use case.
Usage
Build env:
make build
UP all in containers:
make dev
UP Node in host and deps in containers:
make start
Event to elastic
make event-consumer
make user-projections
REST
Get User
GET
/users/:uuid
Create User
POST
/users
{
"uuid": "efa48501-e187-4f17-9c71-3ea9cdb4e795",
"email": "[email protected]"
}
GraphQL
http://localhost:3000/graphiq
Get User
query {
user(uuid: "efa48501-e187-4f17-9c71-3ea9cdb4e795"){
email
uuid
}
}
Create User
mutation {
createUser(uuid:"efa48501-e187-4f17-9c71-3ea9cdb4e795", email:"[email protected]")
}
Tools
- Rabbit Admin: http://localhost:15672
- Kibana: http://localhost:5601 (index name:
events
)