Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonad committed Aug 4, 2016
1 parent d077462 commit abc6312
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
# IndexedDB database adapter for [Yjs](https://github.com/y-js/yjs)
# LevelDB database adapter for [Yjs](https://github.com/y-js/yjs)

Use the IndexedDB database adapter to store your shared data persistently in the browser. The next time you join the session, your changes will still be there.

* Minimizes the amount of data exchanged between server and client
* Makes offline editing possible
* Not supported by all browsers (see [mdn](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API))
Use the LevelDB database adapter to store your shared data persistently in NodeJs applications. The changes will persist after restart.

## Use it!
Install this with bower or npm.

##### Bower
```
bower install y-indexeddb --save
bower install y-leveldb --save
```

##### NPM
```
npm install y-indexeddb --save
npm install y-leveldb --save
```

### Example

```
Y({
db: {
name: 'indexeddb'
name: 'leveldb',
namespace: 'textarea-example' (optional - defaults to connector.room),
dir: './db' // where the database is created,
cleanStart: false // (if true, overwrite existing content - great for debugging)
},
connector: {
name: 'websockets-client', // choose the websockets connector
// name: 'webrtc'
// name: 'xmpp'
room: 'Textarea-example-dev'
room: 'textarea-example'
},
sourceDir: '/bower_components', // location of the y-* modules
share: {
Expand Down

0 comments on commit abc6312

Please sign in to comment.