Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jorge07/typescript-event-sourcing
https://github.com/jorge07/typescript-event-sourcing
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jorge07/typescript-event-sourcing
- Owner: jorge07
- Created: 2018-03-25T14:09:50.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T18:45:35.000Z (about 2 years ago)
- Last Synced: 2023-02-26T22:11:02.598Z (almost 2 years ago)
- Language: TypeScript
- Size: 558 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Event Sourcing in Typescript
This repo its a demo to test implementations of [hollywood-js](https://github.com/jorge07/hollywood) in a pseudo real use case.
### Usage
Build env:
```bash
make build
```UP all in containers:
```bash
make dev
```UP Node in host and deps in containers:
```bash
make start
```Event to elastic
```bash
make event-consumer
```
```bash
make user-projections
```### REST
**Get User**
`GET` `/users/:uuid`
**Create User**
`POST` `/users`
```json
{
"uuid": "efa48501-e187-4f17-9c71-3ea9cdb4e795",
"email": "[email protected]"
}
```### GraphQL
`http://localhost:3000/graphiq`
**Get User**
```
query {
user(uuid: "efa48501-e187-4f17-9c71-3ea9cdb4e795"){
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`)