{"action":"created","issue":{"url":"https://api.github.com/repos/expressjs/express/issues/3107","repository_url":"https://api.github.com/repos/expressjs/express","labels_url":"https://api.github.com/repos/expressjs/express/issues/3107/labels{/name}","comments_url":"https://api.github.com/repos/expressjs/express/issues/3107/comments","events_url":"https://api.github.com/repos/expressjs/express/issues/3107/events","html_url":"https://github.com/expressjs/express/issues/3107","id":184264057,"number":3107,"title":"unix socket support","user":{"login":"magne4000","id":1098371,"avatar_url":"https://avatars.githubusercontent.com/u/1098371?v=3","gravatar_id":"","url":"https://api.github.com/users/magne4000","html_url":"https://github.com/magne4000","followers_url":"https://api.github.com/users/magne4000/followers","following_url":"https://api.github.com/users/magne4000/following{/other_user}","gists_url":"https://api.github.com/users/magne4000/gists{/gist_id}","starred_url":"https://api.github.com/users/magne4000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magne4000/subscriptions","organizations_url":"https://api.github.com/users/magne4000/orgs","repos_url":"https://api.github.com/users/magne4000/repos","events_url":"https://api.github.com/users/magne4000/events{/privacy}","received_events_url":"https://api.github.com/users/magne4000/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-20T15:35:29Z","updated_at":"2016-10-20T15:55:57Z","closed_at":null,"body":"Is it possible to use express with unix socket instead of `host:port` ?\r\n\r\nThe `listen` signature just call underlying server `listen` method, so I tried with:\r\n```node\r\nserver = require('net').createServer(express());\r\nserver.listen('/tmp/sock', function() {\r\n  fs.chmodSync('/tmp/sock', 0777);\r\n});\r\n```\r\n\r\nBut then when, through nginx, I try to access a page, express crashes with the following error:\r\n```\r\n[...]/node_modules/express/lib/router/index.js:140\r\n  var search = 1 + req.url.indexOf('?');\r\n                          ^\r\n\r\nTypeError: Cannot read property 'indexOf' of undefined\r\n    at Function.handle ([...]/node_modules/express/lib/router/index.js:140:27)\r\n    at EventEmitter.handle ([...]/node_modules/express/lib/application.js:173:10)\r\n    at Server.app ([...]/node_modules/express/lib/express.js:38:9)\r\n    at emitOne (events.js:77:13)\r\n    at Server.emit (events.js:169:7)\r\n    at Pipe.onconnection (net.js:1431:8)\r\n```"},"comment":{"url":"https://api.github.com/repos/expressjs/express/issues/comments/255148054","html_url":"https://github.com/expressjs/express/issues/3107#issuecomment-255148054","issue_url":"https://api.github.com/repos/expressjs/express/issues/3107","id":255148054,"user":{"login":"LinusU","id":189580,"avatar_url":"https://avatars.githubusercontent.com/u/189580?v=3","gravatar_id":"","url":"https://api.github.com/users/LinusU","html_url":"https://github.com/LinusU","followers_url":"https://api.github.com/users/LinusU/followers","following_url":"https://api.github.com/users/LinusU/following{/other_user}","gists_url":"https://api.github.com/users/LinusU/gists{/gist_id}","starred_url":"https://api.github.com/users/LinusU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LinusU/subscriptions","organizations_url":"https://api.github.com/users/LinusU/orgs","repos_url":"https://api.github.com/users/LinusU/repos","events_url":"https://api.github.com/users/LinusU/events{/privacy}","received_events_url":"https://api.github.com/users/LinusU/received_events","type":"User","site_admin":false},"created_at":"2016-10-20T15:55:57Z","updated_at":"2016-10-20T15:55:57Z","body":"I think that this is already supported:\r\n\r\n```js\r\nconst express = require('express')\r\nconst app = express()\r\n\r\n// ...\r\n\r\napp.listen('/tmp/sock', () => {\r\n  console.log('Now listening on /tmp/sock')\r\n})\r\n```"}}
{"actor":{"display_login":"LinusU"}}