Serverless Chat

This article presents a group chat tutorial, allowing multiple participants to chat together without the need to install anything. It also features things such as identicons, two-way data binding using vue.js, bootstrap css and CSS animations with help of animate.css. Below is a code-snippet from the source code.

emitter.on('connect', function(){
    // once we're connected, subscribe to the 'chat' channel
    console.log('emitter: connected');
    emitter.subscribe({
        key: key,
        channel: "article1",
        last: 5
    });

    jdenticon.update(".img-circle");
})

// on every message, print it out
emitter.on('message', function(msg){
    console.log('emitter: received ' + msg.asString() );
    vue.$data.messages.push(msg.asObject());
    setTimeout(function(){ 
        jdenticon.update(".img-circle");
    },5);
});