{"id":13541108,"url":"https://github.com/okdistribute/hypercore-stats-server","last_synced_at":"2025-10-06T03:48:39.445Z","repository":{"id":141862354,"uuid":"62925444","full_name":"okdistribute/hypercore-stats-server","owner":"okdistribute","description":"send hypercore/hyperdrive stats over server-side events","archived":false,"fork":false,"pushed_at":"2018-04-10T07:41:33.000Z","size":7,"stargazers_count":10,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-23T06:08:51.997Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/okdistribute.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-07-09T00:56:27.000Z","updated_at":"2018-09-25T02:30:51.000Z","dependencies_parsed_at":"2023-07-16T03:16:18.153Z","dependency_job_id":null,"html_url":"https://github.com/okdistribute/hypercore-stats-server","commit_stats":null,"previous_names":["karissa/hypercore-stats-server"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/okdistribute/hypercore-stats-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okdistribute%2Fhypercore-stats-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okdistribute%2Fhypercore-stats-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okdistribute%2Fhypercore-stats-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okdistribute%2Fhypercore-stats-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/okdistribute","download_url":"https://codeload.github.com/okdistribute/hypercore-stats-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okdistribute%2Fhypercore-stats-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278556190,"owners_count":26006080,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-08-01T10:00:38.646Z","updated_at":"2025-10-06T03:48:39.415Z","avatar_url":"https://github.com/okdistribute.png","language":"JavaScript","funding_links":[],"categories":["Outdated"],"sub_categories":["Other Related Dat Project Modules"],"readme":"# hypercore-stats-server\n\nServer for sending hypercore/hyperdrive stats over server-side events.\n\n```\nnpm install hypercore-stats-server\n```\n\n### Example\n\n````\nvar hyperdiscovery = require('hyperdiscovery')\nvar hyperdrive = require('hyperdrive')\nvar http = require('http')\nvar ram = require('random-access-memory')\nvar stats = require('hypercore-stats-server')\n\n// create a server\nhttp.createServer(function (req, res) {\n\n  // set up a drive\n  var drive = hyperdrive(ram, '72671c5004d3b956791b6ffca7f05025d62309feaf99cde04c6f434189694291')\n  hyperdiscovery(archive)\n\n  // stats for the given drive will be sent to /events\n  if (req.url === '/events') stats(archive, res)\n  else res.end('hi. hit /events for stat events')\n}).listen(10000)\n```\n\n### API\n\n##### `stats(archive, response)`\n\nTakes a hyperdrive archive and an `http` response object. Will return server side events to the response object that represent stats as they are downloaded through the swarm.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokdistribute%2Fhypercore-stats-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fokdistribute%2Fhypercore-stats-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokdistribute%2Fhypercore-stats-server/lists"}