mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
10 lines
241 B
TypeScript
10 lines
241 B
TypeScript
import io = require('socket.io');
|
|
|
|
var socketManager = io.listen(80);
|
|
|
|
socketManager.sockets.on('connection', socket => {
|
|
socket.emit('news', { hello: 'world' });
|
|
socket.on('my other event', data => {
|
|
console.log(data);
|
|
});
|
|
}); |