https://github.com/wisembly/sharedb-redis
https://github.com/wisembly/sharedb-redis
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/wisembly/sharedb-redis
- Owner: Wisembly
- License: mit
- Created: 2019-09-18T12:56:23.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-09-26T12:26:05.000Z (over 6 years ago)
- Last Synced: 2025-04-03T20:37:35.868Z (12 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sharedb-redis
Redis database adapter for [sharedb](https://github.com/share/sharedb)
`ops` are stored as `sharedb:ops:{collection}:{id}` and use the type [Sorted Set](https://redis.io/commands#sorted_set).
`snapshot` is stored as `sharedb:snapshot:{collection}:{id}` and uses the [generic](https://redis.io/commands#generic) type.
### Usage
```cli
npm require sharedb-redis
```
```js
const RedisDatabase = require('sharedb-redis')
const db = new RedisDatabase({
host: '127.0.0.1',
port: 6379
})
const sharedb = new Sharedb({ db })
```
### Tests
```cli
npm run test
```