tbparty
v0.1.1
Published
Wrapper for trollbox.party
Downloads
2
Readme
tbparty
A socket.io wrapper for connecting to https://trollbox.party/
Example
var io = require('tbparty');
var pref = "!";
var socket = io(/* leave empty */);
socket.emit("user joined", "cool guy", "red", "", "");
socket.on("message", function(data){
console.log(data);
if (data.msg == pref+"test"){
socket.send('it works');
}
});
How to use on an existing project
Simply, switch the require('socket.io-client')
to require('tbparty')
and make sure to leave the io()
function empty like this:
var socket = io();