Title: Missing reference (and types) for `response.socket.server` · Issue #47148 · nodejs/node · GitHub
Open Graph Title: Missing reference (and types) for `response.socket.server` · Issue #47148 · nodejs/node
X Title: Missing reference (and types) for `response.socket.server` · Issue #47148 · nodejs/node
Description: Affected URL(s) https://nodejs.org/dist/latest-v18.x/docs/api/http.html#responsesocket Description of the problem There seems to have been a missing property in the API reference (and @types/node typings) regarding the server property of...
Open Graph Description: Affected URL(s) https://nodejs.org/dist/latest-v18.x/docs/api/http.html#responsesocket Description of the problem There seems to have been a missing property in the API reference (and @types/node t...
X Description: Affected URL(s) https://nodejs.org/dist/latest-v18.x/docs/api/http.html#responsesocket Description of the problem There seems to have been a missing property in the API reference (and @types/node t...
Opengraph URL: https://github.com/nodejs/node/issues/47148
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Missing reference (and types) for `response.socket.server`","articleBody":"### Affected URL(s)\n\nhttps://nodejs.org/dist/latest-v18.x/docs/api/http.html#responsesocket\n\n### Description of the problem\n\nThere seems to have been a missing property in the API reference (and @types/node typings) regarding the `server` property of a ServerResponse instance.\r\nI have seen about it multiple times in articles or videos, for example to set up [Socket.io in Next.js](https://betterprogramming.pub/socket-io-and-nextjs-build-real-time-chat-application-part-1-976555ecba) or a [WebSocket module in Nuxt](https://www.youtube.com/watch?v=x9P4pJYCwgY).\r\n\r\nHere is a simple snippet that allows to access the `server` property:\r\n```javascript\r\nconst { createServer } = require('http');\r\n\r\ncreateServer((req, res) =\u003e {\r\n console.log(res.socket.server); // Logs the server instance\r\n});\r\n```\r\n\r\nI don't know if that property is supposed not to be used or if it is just missing from the API references, but it seems like the common way to 'plug in' WebSocket servers onto frameworks that don't directly provide a way to do so.","author":{"url":"https://github.com/purplnay","@type":"Person","name":"purplnay"},"datePublished":"2023-03-18T15:07:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/47148/node/issues/47148"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:67b2a67b-7cfc-270e-e4dc-78ae37d52333 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CAE8:187BE0:3F8749:59B3ED:6A637B6B |
| html-safe-nonce | 061a800f15be1a3177e4b3ce57320c632dfcd8e915e40813b20c8a2be8497077 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQUU4OjE4N0JFMDozRjg3NDk6NTlCM0VEOjZBNjM3QjZCIiwidmlzaXRvcl9pZCI6IjU5MTQ4NTQ0NzAxOTk3Njk5NjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3545d4736684c41f23c81a6216594035b8dbcb9da9bf8dceb315271e95ac9e16 |
| hovercard-subject-tag | issue:1630362094 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/47148/issue_layout |
| twitter:image | https://opengraph.githubassets.com/98799db920fb69361ed6f86da4f6bbe083853e049e702c75c537583655d42906/nodejs/node/issues/47148 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/98799db920fb69361ed6f86da4f6bbe083853e049e702c75c537583655d42906/nodejs/node/issues/47148 |
| og:image:alt | Affected URL(s) https://nodejs.org/dist/latest-v18.x/docs/api/http.html#responsesocket Description of the problem There seems to have been a missing property in the API reference (and @types/node t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | purplnay |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4c1de337de00c7969335f8866af41463301071379a3a15fba12e9b85aa6378d6 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | a4df32552e4c631011bdcd4c81cc3d7408664a8b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width