Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jameskyburz/level-eventstore
eventstore implemented using leveldb-mount, leveldb and level-logs
https://github.com/jameskyburz/level-eventstore
docker eventlog eventsourcing graphql level-eventstore leveldb nodejs
Last synced: about 1 month ago
JSON representation
eventstore implemented using leveldb-mount, leveldb and level-logs
- Host: GitHub
- URL: https://github.com/jameskyburz/level-eventstore
- Owner: JamesKyburz
- Created: 2017-03-30T09:13:52.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-04-29T21:33:54.000Z (almost 4 years ago)
- Last Synced: 2024-10-19T10:41:40.904Z (4 months ago)
- Topics: docker, eventlog, eventsourcing, graphql, level-eventstore, leveldb, nodejs
- Language: JavaScript
- Size: 3.58 MB
- Stars: 7
- Watchers: 5
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# level-eventstore
eventstore using leveldb
[](https://github.com/feross/standard)
[](https://travis-ci.org/JamesKyburz/level-eventstore)
[]()
[](https://npmjs.org/package/level-eventstore)
[]()
[](https://greenkeeper.io/)# server
```sh
npm start
```### Docker
Docker images hosted at https://hub.docker.com/r/jameskyburz/level-eventstore/
docker pull jameskyburz/level-eventstore:version
# Running in docker
```sh
ᐅ docker pull jameskyburz/level-eventstore:version
ᐅ docker run --rm --name level-eventstore -p 5000:5000 jameskyburz/level-eventstore:version
```# example
```js
const wsUrl = 'ws://guest:guest@localhost:5000'
const httpUrl = 'http://guest:guest@localhost:5000'
const client = require('level-eventstore-client')({ wsUrl, httpUrl })await client.append({
log: 'users',
type: 'signup',
payload: {
email: 'foo@bar'
}
})await client.append({
log: 'users',
type: 'verifyAccount',
payload: {
id: '38390783-cd60-4190-8b94-a3d4ac24d653'
}
})const close = client.handleEvents({ log: 'users', since: 0 })({
async signup (payload) {
console.log('insert', payload)
},
async verifyAccount (payload) {
console.log('verify', payload)
}
})insert { email: 'foo@bar', id: '1def7ce5-9da4-40cc-8594-c739fad36a2b' }
verify { id: '38390783-cd60-4190-8b94-a3d4ac24d653' }```
event handlers can be generators, async functions, or vanilla functions in this case they need an extra `callback` argument.
# license
[Apache License, Version 2.0](LICENSE)