mirror of
https://github.com/tokio-rs/axum.git
synced 2024-11-26 00:56:27 +01:00
6c9651c14a
This makes it much clearer which dependencies each example has.
9 lines
258 B
JavaScript
9 lines
258 B
JavaScript
const socket = new WebSocket('ws://localhost:3000/ws');
|
|
|
|
socket.addEventListener('open', function (event) {
|
|
socket.send('Hello Server!');
|
|
});
|
|
|
|
socket.addEventListener('message', function (event) {
|
|
console.log('Message from server ', event.data);
|
|
});
|