internetarchive / dweb-archive

GNU Affero General Public License v3.0
54 stars 16 forks source link

dweb-archive

User Interface to access the archive from the browser. Builds on dweb-transports and typically (currently) loaded from dweb-transport

Background

This library is part of a general project at the Internet Archive (archive.org) to support the decentralized web.

Goals

Installation

Please see the installation instructions in the dweb-mirror repo They are much more recent than the ones below.

All cases

git clone https://git@github.com/internetarchive/dweb-archive.git
cd dweb-archive

# install the dependencies including IPFS & WebTorrent and dweb-transports
npm install  

Installation for testing in a browser

Do the "All Case install above"

Install a simple http-server, this may require sudo depending on permissions

npm run setuphttp
npm install -g http-server` 
cd dist
http-server

Now open a browser page.

Note: Firefox works better than Chrome for local usage as Chrome limits cross-origin http to 6 streams and we need to implement a limited http pool to fix this.

open "http://localhost:8080/archive.html"

To test with limited transports, for example HTTP only, add the transport parameter.

open "http://localhost:8080/archive.html?transport=HTTP"

To test against dweb-mirror you can pass a parameter e.g.

open "http://localhost:8080/archive.html?mirror=localhost:4244&transport=HTTP"

Node Installation to work on this repo

Note that the only reason to do this would be to work on the code,

Do the "All Case install above"

Build (webpack) the bundles and copy needed files to dist/ webpack --mode development

See related:

Repos:

Directory structure here

Directories

Class hierarchy