{"id":20926499,"url":"https://github.com/lukes/nano-stream-ws","last_synced_at":"2025-06-29T16:35:35.221Z","repository":{"id":66305224,"uuid":"131548926","full_name":"lukes/nano-stream-ws","owner":"lukes","description":"A tiny and performant websocket server that streams block data from a nano currency node","archived":false,"fork":false,"pushed_at":"2023-07-11T11:07:54.000Z","size":39,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-23T17:14:11.698Z","etag":null,"topics":["cryptocurrency","nano","nanocurrency","nodejs","rpc","server","stream","streaming","websocket","websocket-server","websockets"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-30T02:41:16.000Z","updated_at":"2023-09-07T21:05:33.000Z","dependencies_parsed_at":"2024-11-14T21:39:24.522Z","dependency_job_id":"11177110-2c52-43b0-85ed-19197ed114d0","html_url":"https://github.com/lukes/nano-stream-ws","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lukes/nano-stream-ws","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukes%2Fnano-stream-ws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukes%2Fnano-stream-ws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukes%2Fnano-stream-ws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukes%2Fnano-stream-ws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukes","download_url":"https://codeload.github.com/lukes/nano-stream-ws/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukes%2Fnano-stream-ws/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262018760,"owners_count":23245620,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptocurrency","nano","nanocurrency","nodejs","rpc","server","stream","streaming","websocket","websocket-server","websockets"],"created_at":"2024-11-18T20:39:08.324Z","updated_at":"2025-06-29T16:35:35.187Z","avatar_url":"https://github.com/lukes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# nano-stream-ws\n\n[![npm version](https://badge.fury.io/js/nano-stream-ws.svg)](https://badge.fury.io/js/nano-stream-ws)\n\nA tiny and performant websocket server that streams block data from a [nano currency](https://nano.org/) node.\n\nIt builds on the socket stream of block data set up by the [nano-stream-x](https://github.com/lukes/nano-stream-x) library.\n\n## Installation\n\nInstall both [`nano-stream-x`](https://github.com/lukes/nano-stream-x) and `nano-stream-ws` as global packages:\n\n    npm install --global nano-stream-x\n    npm install --global nano-stream-ws\n\n## Usage\n\n### Start the stream\n\n    nano-stream-x\n\nThis will start a streaming server on `127.0.0.1:3000`. To override these:\n\n    nano-stream-x host=ip6-localhost port=3001\n\n### Start the websocket server\n\n    nano-stream-ws\n\nThe websocket server will bind to host `0.0.0.0` on port `8080`. To override these:\n\n    nano-stream-ws host=\"127.0.0.1\" port=8081\n\n### Configure your Nano node to send data to nano-stream-x\n\nYour Nano node is easily configured to send block processing data to a server (in this case `nano-stream-x`). See the [wiki article](https://github.com/lukes/nano-stream-x/wiki/Configure-your-Nano-node-to-send-data-to-the-nano-stream-x) (external link) for how to set this up.\n\n### Authentication\n\nBy default the websocket server will accept connections from anywhere. You may wish to lock down the connections by using a token standard called [JWT](https://jwt.io/introduction/). If the `jwt_secret` argument is passed, the server will expect a client to connect with a JWT.\n\n    nano-stream-ws jwt_secret=my_secret\n\nSee [using JWT with nano-stream-ws](https://github.com/lukes/nano-stream-ws/wiki/Authenticating-with-JSON-Web-Tokens-(JWT)) for more on what should be in the JWT token.\n\n### Whitelisting\n\nUse the `origin_whitelist` argument to restrict connections from specific domains. Note that this is not a particularly secure measure as people can set referrer origin headers themselves, but can be used if you wish to try to lock down connections somewhat without any guarantees.\n\n    nano-stream-ws origin_whitelist=localhost,*.mydomain.com\n\n### See\n\n* [Running in production](https://github.com/lukes/nano-stream-ws/wiki/Running-in-production) wiki page\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukes%2Fnano-stream-ws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukes%2Fnano-stream-ws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukes%2Fnano-stream-ws/lists"}