refactor(@nestjs) rename directories, add script, fix tests

This commit is contained in:
Kamil Myśliwiec
2018-03-24 15:11:48 +01:00
parent 3b6981918a
commit 614de27310
1239 changed files with 686 additions and 73 deletions

View File

@@ -0,0 +1,22 @@
<html>
<head>
<script src="socket.io.js"></script>
<script>
const socket = io('http://localhost:3000');
socket.on('connect', function() {
console.log('Connected');
socket.emit('events', { test: 'test' });
});
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>
<body></body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,18 @@
<html>
<head>
<script>
const socket = new WebSocket('ws://localhost:81');
socket.onopen = function() {
console.log('Connected');
socket.send(JSON.stringify({
type: 'events',
message: 'test',
}));
socket.onmessage = function(data) {
console.log(data);
}
};
</script>
</head>
<body></body>
</html>