diff --git a/lib/index.js b/lib/index.js index 6b9b153b..0882d4be 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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);