Giter Site home page Giter Site logo

hyperdrive-gateway's Introduction

Hyperdrive Gateway

Gateway for viewing hyperdrive websites.

About

Hyperdrive Gateway is an HTTP/2 server that can serve static websites and single-page web applications that are contained within a hyperdrive. A hyperdrive is peer-to-peer folder that can be shared by it's unique key using tools provided by the hypercore-protocol team. Browsers are only beginning to support these peer-to-peer protocols. Until browsers support the hyper:// protocol, gateways can fetch the web applications from the peer-to-peer network and serve it to the browser.

How to use the gateway

  1. Create and seed(share) a hyperdrive that contains a static website, using the documentation on the hypercore protocol site. After creating a hyperdrive, you'll receive a unique key that looks like 34f4c3f0bcf6bf5c39d7814d373946d8f04da5b4a525d940c98309cafb111d93.

  2. Until a public gateway is available, use the development documentation to start a gateway locally.

  3. Enter your key into the text field on the home page, prefixed by hyper://. You can also use a route to be redirected. The route path on the gateway is /hyper/HYPERDRIVE_KEY/FILE_PATH.

  4. The gateway will redirect you the unique subdomain for your website. The hyperdrive address is too long to be used as a subdomain, so the gateway converts the hexadecimal address to base32, which is your unique subdomain.

External Hyperdrive Links

The gateway supports links to other hyperdrives, as well as ESM imports from other hyperdrives. To support this, the gateway runs a find/replace on all .html, .js, and .css files, replacing all hyper:// links with https:// links that point to the gateway. If you would like to display a hyper:// link, immediately wrap the text in an element tag, such as <span>.

Repositories

Docker image

There's a Hyperdrive Gateway docker image on dockerhub. The docker image is all that's needed to run an instance of Hyperdrive Gateway and includes the UI.

Development

Development documentation

hyperdrive-gateway's People

Contributors

rhythnic avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.