const Connector = require('./connector/connector.js').Connector const AppsHandler = require('./handlers/apps.js').AppsHandler // create handlers const appsHandler = new AppsHandler() // create connector and add handlers for events const connector = new Connector({ 'pouchdb.apps.create': appsHandler.create, 'pouchdb.apps.update': appsHandler.update, 'pouchdb.apps.findOne': appsHandler.findOne, 'pouchdb.apps.find': appsHandler.find }) // connector.client.onerror = function() { } // connector.client.onopen = function() { } // connector.client.onclose = function() { process.exit() }