From fc65ed630a50348984ee88cba93dbdf455e28cae Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Sun, 16 Dec 2012 21:36:04 -0300 Subject: [PATCH] index: override `path` with `/socket.io` --- lib/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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);