O
O
odd-look2015-02-06 14:31:22
Socket.io
odd-look, 2015-02-06 14:31:22

How to understand socket.io initialization?

It needs to be integrated into a ready-made application based on express generator. But for this, you first need to figure out how socket.io is initialized.

var express = require('express');
var app = express();
var http = require('http').Server(app);
var io = require('socket.io')(http);

What is done in the http variable? Why is .Server(app) needed?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question