API Overview

API Technology and Configuration.

WebSocket and REST

Frontend-backend communication is done through WebSockets, mimicing REST architecture.

For a working backend example, see StackOverflow implementation.

For a working frontend example, use the following code:

// Default address: http://localhost:8080/.
var sock = new SockJS('<Enter your address>');

sock.onopen = function() {
    console.log('open');
    sock.send('test');
};

sock.onmessage = function(e) {
    console.log('message', e.data);
};

sock.onclose = function() {
    console.log('close');
};