<!doctype html>
<html>
    <head>
        <script src="/sockjs-0.3.4.min.js"></script>
        <script>
            var sock = new SockJS('/echo');
            sock.onopen = function() {
                console.log('open');
                sock.send('hello');
            };
            sock.onmessage = function(e) {
                console.log('message', e.data);
            };
            sock.onclose = function() {
                console.log('close');
            };
        </script>
    </head>
    <body>
    </body>
</html>