We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
const app = require('express')(); const http = require('http').Server(app); const io = require('socket.io')(http); // Creates new socket instance connected to the http server
const app = require('express')()
const http = require('http').Server(app);
const io = require('socket.io')(http); // Creates new socket instance connected to the http server
var nsp = io.of('/my-namespace'); nsp.on('connection', function(socket) { console.log('someone connected'); nsp.emit('hi', 'Hello everyone!'); });
var nsp = io.of('/my-namespace');
nsp.on('connection', function(socket) {
console.log('someone connected');
nsp.emit('hi', 'Hello everyone!');
});
DEBUG=* node app.js