Skip to content

Instantly share code, notes, and snippets.

@ozalexo
Created March 4, 2012 23:32
Show Gist options
  • Save ozalexo/1975386 to your computer and use it in GitHub Desktop.
Save ozalexo/1975386 to your computer and use it in GitHub Desktop.
firebird: listen events
var drev = require('drev')
, fb = require('firebird');
var conn = fb.createConnection();
conn.connectSync('nodejs:/opt/firebird/dbs/testdb.fdb', 'SYSDBA', 'masterkey', '');
conn.addFBevent("fbevent");
conn.on("fbevent",function(event,count){
console.log('GOT EVENT');
drev.emit('newevent', 'any text');
});
drev.on('newevent', function(msg){console.log('GOT DREV EVENT')});
function wait4ever () {
process.nextTick(wait4ever);
};
process.nextTick(wait4ever);
drev.start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment