{"action":"created","issue":{"url":"https://api.github.com/repos/maxogden/websocket-stream/issues/130","repository_url":"https://api.github.com/repos/maxogden/websocket-stream","labels_url":"https://api.github.com/repos/maxogden/websocket-stream/issues/130/labels{/name}","comments_url":"https://api.github.com/repos/maxogden/websocket-stream/issues/130/comments","events_url":"https://api.github.com/repos/maxogden/websocket-stream/issues/130/events","html_url":"https://github.com/maxogden/websocket-stream/issues/130","id":248271085,"number":130,"title":"Add an example of express-js","user":{"login":"moshest","id":534911,"avatar_url":"https://avatars2.githubusercontent.com/u/534911?v=4","gravatar_id":"","url":"https://api.github.com/users/moshest","html_url":"https://github.com/moshest","followers_url":"https://api.github.com/users/moshest/followers","following_url":"https://api.github.com/users/moshest/following{/other_user}","gists_url":"https://api.github.com/users/moshest/gists{/gist_id}","starred_url":"https://api.github.com/users/moshest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moshest/subscriptions","organizations_url":"https://api.github.com/users/moshest/orgs","repos_url":"https://api.github.com/users/moshest/repos","events_url":"https://api.github.com/users/moshest/events{/privacy}","received_events_url":"https://api.github.com/users/moshest/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-08-06T20:47:20Z","updated_at":"2017-08-07T15:13:07Z","closed_at":"2017-08-07T15:13:07Z","body":"Using `express-ws` module:\r\n\r\n```js\r\nconst express = require('express');\r\nconst expressWebSocket = require('express-ws');\r\nconst websocketStream = require('websocket-stream/stream');\r\nconst app = express();\r\n\r\n// extend express app with app.ws()\r\nexpressWebSocket(app, null, {\r\n    perMessageDeflate: false,\r\n});\r\n \r\napp.ws('/bigdata.json', function(ws, req) {\r\n  const stream = websocketStream(ws, {\r\n    binary: true,\r\n  });\r\n\r\n  fs.createReadStream('bigdata.json').pipe(stream);\r\n});\r\n \r\napp.listen(3000);\r\n```"},"comment":{"url":"https://api.github.com/repos/maxogden/websocket-stream/issues/comments/320691719","html_url":"https://github.com/maxogden/websocket-stream/issues/130#issuecomment-320691719","issue_url":"https://api.github.com/repos/maxogden/websocket-stream/issues/130","id":320691719,"user":{"login":"moshest","id":534911,"avatar_url":"https://avatars2.githubusercontent.com/u/534911?v=4","gravatar_id":"","url":"https://api.github.com/users/moshest","html_url":"https://github.com/moshest","followers_url":"https://api.github.com/users/moshest/followers","following_url":"https://api.github.com/users/moshest/following{/other_user}","gists_url":"https://api.github.com/users/moshest/gists{/gist_id}","starred_url":"https://api.github.com/users/moshest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moshest/subscriptions","organizations_url":"https://api.github.com/users/moshest/orgs","repos_url":"https://api.github.com/users/moshest/repos","events_url":"https://api.github.com/users/moshest/events{/privacy}","received_events_url":"https://api.github.com/users/moshest/received_events","type":"User","site_admin":false},"created_at":"2017-08-07T15:13:07Z","updated_at":"2017-08-07T15:13:07Z","body":"Please see #132."}}
{"actor":{"display_login":"moshest"}}