Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
* Module dependencies.
*/
var path = require('path');
var join = path.join;
var express = require('express');
var app = module.exports = express();
var server = require('http').createServer(app);
var Session = require('connect-leveldb')(express);
var engine = require('engine.io');
var IO = require('io-server');
var build = require('build').build;
var conf = require('conf');
var args = require('args');
var port = args.port || 8080;
/**
* Set up engine.io
*/
var es = new engine.Server();
server.on('upgrade', function(req, socket, head) {
es.handleUpgrade(req, socket, head);
});
es.on('connection', IO);
/**
* Configuration
*/