{"id":13541096,"url":"https://github.com/joehand/archiver-server","last_synced_at":"2026-03-09T03:35:15.123Z","repository":{"id":65994283,"uuid":"72774494","full_name":"joehand/archiver-server","owner":"joehand","description":"Serve hypercore-archiver over discovery-swarm","archived":false,"fork":false,"pushed_at":"2017-04-19T18:21:39.000Z","size":34,"stargazers_count":14,"open_issues_count":6,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-09T05:45:40.492Z","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/joehand.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-11-03T18:25:01.000Z","updated_at":"2020-05-19T03:09:15.000Z","dependencies_parsed_at":"2023-05-21T18:00:28.004Z","dependency_job_id":null,"html_url":"https://github.com/joehand/archiver-server","commit_stats":{"total_commits":29,"total_committers":6,"mean_commits":4.833333333333333,"dds":0.2068965517241379,"last_synced_commit":"32960414515747bfd5a28d8af5c95bbdd0644b0b"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/joehand/archiver-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joehand%2Farchiver-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joehand%2Farchiver-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joehand%2Farchiver-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joehand%2Farchiver-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joehand","download_url":"https://codeload.github.com/joehand/archiver-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joehand%2Farchiver-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30281574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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.450Z","updated_at":"2026-03-09T03:35:10.107Z","avatar_url":"https://github.com/joehand.png","language":"JavaScript","funding_links":[],"categories":["Outdated"],"sub_categories":["Other Related Dat Project Modules"],"readme":"# Archiver-Server\n\nServe Dat Archives stored in a [hypercore-archiver](https://github.com/mafintosh/hypercore-archiver).\n\nArchives can be served over HTTP and the Dat Network (via `discovery-swarm`).\n\n## Usage\n\n### Serve on Dat Network\n\nServe archives in a hypercore-archiver with discovery-swarm.\n\n```js\nvar Archiver = require('hypercore-archiver')\nvar archiverServer = require('archiver-server')\n\nvar archives = Archiver('archives', {swarm: true})\nvar datServer = archiverServer(archives)\n\ndatServer.swarm.on('listening', function () {\n  console.log('Listening for connections on the Dat Network')\n})\n\n// (Later) Any archives added will be available over discovery-swarm network\narchives.add(key)\n```\n\n### Serve Over HTTP\n\n```js\nvar http = require('http')\nvar Archiver = require('hypercore-archiver')\nvar archiverServer = require('archiver-server')\n\nvar archiver = Archiver('archives')\nvar datServer = archiverServer(archiver, {http: true})\n\n// Bring your own HTTP server and handle requests\nvar server = http.createServer()\nserver.on('request', datServer.httpRequest)\nserver.listen(argv.httpPort, function () {\n    console.log('Server is listening on port ' + port)\n})\n\n// (Later) Any archives added will be available over HTTP\narchives.add(key)\n```\n\n### CLI\n\nArchiver-server provides a basic CLI utility. There is currently no interface to add/remove archives to the hypercore-archiver, so it may be difficult to add use the CLI except for testing on preexisting archiver directories.\n\nRun `npm start` to run the CLI in debug mode.\n\nOptions:\n\n* `--httpPort 8080`: Port for HTTP server\n* `--datPort 3282`: Port for Dat Network\n* `--archiveDir dats`: Directory for `hypercore-archiver` storage\n* `--swarm` (boolean): Serve archives on the Dat Network\n* `--http` (boolean): Serve archives over HTTP\n\n## API\n\n### var server = archiverServer(archiver, [opts])\n\nCreate a server for a `hypercore-archiver`. Use `http` and `swarm` to specify which server types to use.\n\nOptions include:\n\n```js\nopts = {\n  http: true, // Return onrequest function to serve over HTTP\n  swarm: true, // Serve over Dat Network\n  utp: true, // Passed to Discovery-Swarm\n  tcp: true, // Passed to Discovery-Swarm\n  datPort: 3282 // Passed to Discovery-Swarm\n}\n```\n\n#### `server.swarm`\n\n`discovery-swarm` for your archives. Automatically connects.\n\n#### `server.httpRequest`\n\nBring your own HTTP server. Use `server.httpRequest` for your http server's request function.\n\nHTTP requires hypercore-archiver `^2.3.0`.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoehand%2Farchiver-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoehand%2Farchiver-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoehand%2Farchiver-server/lists"}