Hosted at: https://via.hypothes.is/
Installing Via in a development environment
You will need
Via integrates with h and the Hypothesis client, so you will need to set up development environments for each of those before you can develop Via:
pyenv Follow the instructions in the pyenv README to install it. The Homebrew method works best on macOS.
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
Start the development server
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:
- Create SSL certificates for localhost (you can reuse these for other Hypothesis services). See https://hyp.is/5xXOUMiuEeiDy2smINki5w/letsencrypt.org/docs/certificates-for-localhost/
- Copy or symlink the certificate and private key as
.tlskey.pemrespectively in the root of your checkout of this repository.
- Start Via using
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