pee

peerweb

A client side library for fetching and rendering a static website via torrent over WebRTC

Showing:

Popularity

Downloads/wk

74

GitHub Stars

2

Maintenance

Last Commit

4yrs ago

Contributors

3

Package

Dependencies

2

Size (min+gzip)

102.4KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

PeerWeb.js

Code Climate Dependency Status devDependency Status Standard - JavaScript Style Guide npm npm

A package to download and render a decentralised webpage thanks to WebTorrent. It's in alpha so a lot of bugs are expected.

Install via npm

$ npm install --save peerweb

Usage

Build a simple static webpage and then create a torrent (instant.io for simplicity) with the whole folder like the following example

├── js
│   ├── main.js
│   └── other.js
├── imgs
│   ├── foo.png
│   └── bar.png
├── css
│   └── main.css
└── index.html

get the magnet link and then use it in a webpage like this

import PeerWeb  from 'peerweb'

const peerweb = new PeerWeb(true) // true for debug

peerweb.render(YOUR_MAGNET_LINK)

Contribute

Feel free to create pull request and issues with bugs or feature request. There are tons of features planned as render index faster, do not redownload files, get magnet link from files... etc.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100