All Projects → kelindar → Demo Chat

kelindar / Demo Chat

Licence: mit
A simple chat application built using emitter.io

Programming Languages

javascript
184084 projects - #8 most used programming language

Serverless Chat with emitter.io

screen

This article presents a group chat tutorial, allowing multiple participants to chat together. It also features things such identicons, two-way data binding using vue.js, bootstrap css and CSS animations with help of ani mate.css. Below is a code-snipped 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);
});
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].