{"id":13540950,"url":"https://github.com/dat-ecosystem-archive/hyperdrive-http","last_synced_at":"2025-04-02T08:30:53.506Z","repository":{"id":65991396,"uuid":"61909627","full_name":"dat-ecosystem-archive/hyperdrive-http","owner":"dat-ecosystem-archive","description":"HTTP request handler for Hyperdrive and Hypercore [ DEPRECATED - More info on active projects and modules at https://dat-ecosystem.org/ ] ","archived":true,"fork":false,"pushed_at":"2022-01-06T02:04:03.000Z","size":108,"stargazers_count":68,"open_issues_count":4,"forks_count":22,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-05-16T13:14:32.365Z","etag":null,"topics":["dat","dat-protocol","http","hyperdrive"],"latest_commit_sha":null,"homepage":"","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/dat-ecosystem-archive.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-06-24T20:07:28.000Z","updated_at":"2024-07-25T09:12:24.420Z","dependencies_parsed_at":"2023-02-20T19:45:21.559Z","dependency_job_id":null,"html_url":"https://github.com/dat-ecosystem-archive/hyperdrive-http","commit_stats":null,"previous_names":["joehand/hyperdrive-http"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dat-ecosystem-archive%2Fhyperdrive-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dat-ecosystem-archive%2Fhyperdrive-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dat-ecosystem-archive%2Fhyperdrive-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dat-ecosystem-archive%2Fhyperdrive-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dat-ecosystem-archive","download_url":"https://codeload.github.com/dat-ecosystem-archive/hyperdrive-http/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246781886,"owners_count":20832925,"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":["dat","dat-protocol","http","hyperdrive"],"created_at":"2024-08-01T10:00:36.533Z","updated_at":"2025-04-02T08:30:52.849Z","avatar_url":"https://github.com/dat-ecosystem-archive.png","language":"JavaScript","readme":"[![deprecated](http://badges.github.io/stability-badges/dist/deprecated.svg)](https://dat-ecosystem.org/) \n\nMore info on active projects and modules at [dat-ecosystem.org](https://dat-ecosystem.org/) \u003cimg src=\"https://i.imgur.com/qZWlO1y.jpg\" width=\"30\" height=\"30\" /\u003e \n\n---\n\n# Hyperdrive Http\n\nServe a [hyperdrive](https://github.com/mafintosh/hyperdrive) archive over HTTP. For an example of use, see [dat.haus](https://github.com/juliangruber/dat.haus).\n\n[![Travis](https://api.travis-ci.org/joehand/hyperdrive-http.svg)](https://travis-ci.org/joehand/hyperdrive-http)\n\n## Usage\n\nHyperdrive-http returns a function to call when you receive a http request:\n\n```js\nvar server = http.createServer().listen(8000)\nserver.on('request', hyperdriveHttp(archive))\n```\n\nSupports manifest options in `dat.json`:\n\n* `web_root` - change directory to serve on index\n* `fallback_page` - fallback for 404 errors\n\n### Setup\n\nTo use hyperdrive-http you will need to:\n\n* Create your own http server\n* Setup your hyperdrive archive\n* For remote archives, connect to the swarm\n\n## API\n\nHyperdrive works with many archives/feeds or a single archive.\n\n#### Options\n\n- `exposeHeaders` - If set to `true`, hyperdrive-http will add custom `Hyperdrive-` HTTP headers to directory listing requests (default: `false`):\n  ```http\n  Hyperdrive-Key: de2a51bbaf8a5545eff82c999f15e1fd29637b3f16db94633cb6e2e0c324f833\n  Hyperdrive-Version: 4\n  ```\n- `live` - If set to `true` will reload a directly listing if the archive receives updates.\n- `footer` - Add a footer to your HTML page. Automatically adds archive version number to footer.\n\n### URL Format\n\nHyperdrive-http responds to any URL with a specific format. If the URL does cannot be parsed, it will return a 404.\n\n* Get archive listing: `http://archive-example.com/`\n* Get file from archive: `http://archive-example.com/filename.pdf`\n\nIf a directory in the archive contains an `index.html` page that file is returned instead of the directory listing. If you'd like to view files use a query string:\n\n* View files: `http://archive-example.com/?viewSource=true`\n\n\n## CLI\n\nThere is also a CLI that can be used for demo + testing. Pass it a dat link or a path to an existing dat folder:\n\n```\nnode cli.js \u003cdat-key\u003e\nnode cli.js /path/do/existing/dat\n```\n","funding_links":[],"categories":["Outdated","JavaScript"],"sub_categories":["Other Related Dat Project Modules"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdat-ecosystem-archive%2Fhyperdrive-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdat-ecosystem-archive%2Fhyperdrive-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdat-ecosystem-archive%2Fhyperdrive-http/lists"}