tiny tool to sync data between CouchDB and MySQL
well, i presented CouchDB to a person and the first question was... "can you sync with MySQL?"
"Can PouchDB sync with MongoDB/MySQL/my current non-CouchDB database? No." - CouchDB FAQ.
Whith this tool... Yes.
converter listen for CouchDB changes and reflects them on MySQL.
var converter = require('couchdb-to-mysql');
var cvr = converter();
cvr.connect();
cvr.on('created', function (change) {
// replicate changes on mysql
});
var converter = require('couchdb-to-mysql')
Optionaly pass in a config
:
config.couch.host
config.couch.port
config.couch.database
config.mySQL.host
config.mySQL.port
config.mySQL.user
config.mySQL.password
config.mySQL.database
Every time a document is created, a created
event fires.
Every time a document is updated, a updated
event fires.
Every time a document is deleted, a deleted
event fires.