diff options
author | Joffrey BION <joffrey.bion@gmail.com> | 2017-05-22 01:28:08 +0200 |
---|---|---|
committer | Joffrey BION <joffrey.bion@gmail.com> | 2017-05-22 01:28:08 +0200 |
commit | b9ff246015fc99284b2a7d00a5d56d5214d31a49 (patch) | |
tree | aebc84e1968aa2111aab3579b490638915c6fff3 /backend/src/main/resources/static/test-ws.js | |
parent | Update prettier config and reformat (diff) | |
download | seven-wonders-b9ff246015fc99284b2a7d00a5d56d5214d31a49.tar.gz seven-wonders-b9ff246015fc99284b2a7d00a5d56d5214d31a49.tar.bz2 seven-wonders-b9ff246015fc99284b2a7d00a5d56d5214d31a49.zip |
Remove old experimental page
Diffstat (limited to 'backend/src/main/resources/static/test-ws.js')
-rw-r--r-- | backend/src/main/resources/static/test-ws.js | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/backend/src/main/resources/static/test-ws.js b/backend/src/main/resources/static/test-ws.js deleted file mode 100644 index 1c64349e..00000000 --- a/backend/src/main/resources/static/test-ws.js +++ /dev/null @@ -1,40 +0,0 @@ -var stompClient = null; - -function connect() { - console.log('Connecting...'); - var socket = new SockJS('/seven-wonders-websocket'); - stompClient = Stomp.over(socket); - stompClient.connect({}, function (frame) { - console.log('Connected: ' + frame); - subscribeTo('/user/queue/errors'); - }); -} - -function send(endpoint, payload) { - stompClient.send(endpoint, {}, payload); -} - -function subscribeTo(endpoint) { - $("#test-feeds").prepend('<tr><td>' + endpoint + '</td><td>Subscribed</td></tr>'); - stompClient.subscribe(endpoint, function (data) { - $("#test-feeds").prepend('<tr><td>' + endpoint + '</td><td>Received: <pre>' + data.body + '</pre></td></tr>'); - }); -} - -$(function () { - $("form").on('submit', function (e) { - e.preventDefault(); - }); - $("#send-btn").click(function () { - var endpoint = $("#path-field").val(); - var payload = $("#payload-field").val(); - send(endpoint, payload); - }); - $("#subscribe-btn").click(function () { - var endpoint = $("#subscribe-path-field").val(); - subscribeTo(endpoint); - }); -}); - -// auto-connect -connect();
\ No newline at end of file |