mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
sample() update existing samples to 6.0.0
This commit is contained in:
@@ -1,27 +1,27 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<head>
|
||||
<script src="socket.io.js"></script>
|
||||
<script>
|
||||
const socket = io('http://localhost:3000');
|
||||
socket.on('connect', function () {
|
||||
console.log('Connected');
|
||||
const socket = io('http://localhost:3000');
|
||||
socket.on('connect', function() {
|
||||
console.log('Connected');
|
||||
|
||||
socket.emit('events', { test: 'test' });
|
||||
socket.emit('identity', 0, (response) => console.log('Identity:', response));
|
||||
});
|
||||
socket.on('events', function (data) {
|
||||
console.log('event', data);
|
||||
});
|
||||
socket.on('exception', function (data) {
|
||||
console.log('event', data);
|
||||
});
|
||||
socket.on('disconnect', function () {
|
||||
console.log('Disconnected');
|
||||
});
|
||||
socket.emit('events', { test: 'test' });
|
||||
socket.emit('identity', 0, response =>
|
||||
console.log('Identity:', response),
|
||||
);
|
||||
});
|
||||
socket.on('events', function(data) {
|
||||
console.log('event', data);
|
||||
});
|
||||
socket.on('exception', function(data) {
|
||||
console.log('event', data);
|
||||
});
|
||||
socket.on('disconnect', function() {
|
||||
console.log('Disconnected');
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
</head>
|
||||
|
||||
<body></body>
|
||||
|
||||
</html>
|
||||
<body></body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user