当前位置: 软件>JavaScript软件
Node.js 数据库实时监控库 node-dbmon
来源: http://www.oschina.net/p/node-dbmon
发布时间:2015-01-11
本文导语: node-dbmon 是一个 Node.js 数据库实时监控库,如果你希望在数据库表数据更改后,或者是文件修改后能更新 GUI,那么这个库正好适合你。 示例代码: var pg=require('pg'), cli=new pg.Client('tcp://postgres@localhost/template1'), dbmon=require('dbmon...
node-dbmon 是一个 Node.js 数据库实时监控库,如果你希望在数据库表数据更改后,或者是文件修改后能更新 GUI,那么这个库正好适合你。
示例代码:
var pg=require('pg'), cli=new pg.Client('tcp://postgres@localhost/template1'), dbmon=require('dbmon'); cli.connect(); //uncomment if you want node to create the temporary table for you //cli.query('drop table if exists testtable; create table testtable(id integer primary key, val varchar(10));'); var channel=dbmon.channel({ driver:'postgresql', driverOpts:{ postgresql:{ cli:cli } }, table:'testtable', monitor:'all', keyfld:{ name:'id',type:'integer' } });
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。