Skip to content
master
Go to file
Code

Files

Permalink
Failed to load latest commit information.

README.md

Code style: black

via.hypothes.is

This project uses the live web rewriting and banner injection capabilities of pywb web replay system to automatically add hypothes.is annotations to any web pages.

Hosted at: https://via.hypothes.is/

Some examples:

https://via.hypothes.is/http://hypothes.is/

https://via.hypothes.is/http://www.autodidacts.io/openbci-brain-basics-neurons-structure-and-biology/

Installing Via in a development environment

You will need

Clone the git repo

git clone https://github.com/hypothesis/via.git

This will download the code into a via directory in your current working directory. You need to be in the via directory from the remainder of the installation process:

cd via

Start the development server

make dev

The first time you run make dev it might take a while to start because it'll need to install the application dependencies and build the assets.

This will start the server on port 9080 (http://localhost:9080), reload the application whenever changes are made to the source code, and restart it should it crash for some reason.

That's it! You’ve finished setting up your Via development environment. Run make help to see all the commands that're available for running the tests, linting, code formatting, etc.

Serving Via over SSL in development

To serve Via over SSL locally, you will need to:

  1. Create SSL certificates for localhost (you can reuse these for other Hypothesis services). See https://hyp.is/5xXOUMiuEeiDy2smINki5w/letsencrypt.org/docs/certificates-for-localhost/
  2. Copy or symlink the certificate and private key as .tlscert.pem and .tlskey.pem respectively in the root of your checkout of this repository.
  3. Start Via using make dev-ssl

Steps (1) and (2) are the same as for setting up SSL support in other Hypothesis projects.

Note that this configuration is not suitable for production use. Hypothesis' production services use SSL termination provided by AWS load balancers.

Updating the PDF viewer

Via serves PDFs using PDF.js. PDF.js is vendored into the source tree and the viewer HTML is patched to load the Hypothesis client. To update the PDF viewer, run tools/update-pdfjs.

You can’t perform that action at this time.