Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 748 Bytes

README.md

File metadata and controls

19 lines (13 loc) · 748 Bytes

socket.io-couchdb

A plugin for socket.io using couchdb as a storage backend. Based on the socket.io-redis adapter.

How to use

var io = require('socket.io')(3000);
var couchdb = require('socket.io-couchdb');
io.adapter(couchdb({ host: 'localhost', port: 5984, db : 'socket.io', encode : true }));

By running socket.io with the socket.io-couchdb adapter you can run multiple socket.io instances in different processes or servers that can all broadcast and emit events to and from each other.

If you need to emit events to socket.io instances from a non-socket.io process, you should use socket.io-couchdb-emitter.