test queue
This commit is contained in:
+10
-7
@@ -1,14 +1,17 @@
|
||||
<script src="/ws/socket.io/socket.io.js"></script>
|
||||
<script src="http://localhost:8201/ws/socket.io/socket.io.js"></script>
|
||||
<!-- <script src="/ws/socket.io/socket.io.min.js"></script>-->
|
||||
<script>
|
||||
const socket = io("http://localhost", {
|
||||
<script>
|
||||
const socket = io("http://localhost:8201", {
|
||||
path: '/ws/socket.io',
|
||||
query: 'id=123'
|
||||
query: 'id=channel'
|
||||
});
|
||||
socket.on('data', (arg) => {
|
||||
console.log(arg);
|
||||
const doc = document.getElementById('test');
|
||||
const div = document.createElement('div');
|
||||
div.innerHTML = JSON.stringify(arg);
|
||||
doc.append(div);
|
||||
});
|
||||
</script>
|
||||
|
||||
<div id=test>
|
||||
</div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
|
||||
Reference in New Issue
Block a user