0.0.3 • Published 9 years ago

txtsub v0.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

txtsub

txtsub is a Pub/sub for Node.js with text file.

Example

var client = require("./index.js");

var sub = client();
sub.subscribe("test.txt", function(data){
	console.log("alltext", data.raw);
	console.log("diff", data.diff);
});

var pub = client();
setTimeout(function(){
	pub.publish("test.txt", "hello");	// "sub hello"
}, 1000);

Install

npm install txtsub

Error Handling

var client = client();
client.on("error", function(err){
	// some error
});