struts-mongo
struts handler for mongodb
Provides simple connection using the native mongodb node.js driver, as well as oplog monitoring for specified collections. All events follow the struts hub/spoke model and are emitted on the hub emitter.
Usage
// this represents the possible options and their defaults:const options = dbhost: "127.0.0.1" dbname: "test" dbopts: {} // passed to driver, see http://mongodb.github.io/node-mongodb-native/2.2/api/MongoClient.html root: "mongodb" // root of emitted events (e.g. 'mongodb.connected') { thisdb = this options; thisdb; thisdbstart; // handle events here or in other struts handlers this; this; this; this; }