index: override path with /socket.io

This commit is contained in:
Guillermo Rauch
2012-12-16 21:36:04 -03:00
parent 98c4bb6955
commit fc65ed630a

View File

@@ -100,7 +100,11 @@ Server.prototype.attach = function(srv, opts){
srv.listen(port);
}
debug('creating engine.io instance', opts);
// set engine.io path to `/socket.io`
opts = opts || {};
opts.path = opts.path || '/socket.io';
debug('creating engine.io instance with opts %j', opts);
if (this._static) this.serve(srv);
srv = engine.attach(srv, opts);
this.bind(srv);