You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
potato-launcher/extensions/pouchdb/index.js

29 lines
613 B

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()
}