Installing h in a development environment¶
- https://github.com/hypothesis/client/ for installing the Hypothesis client
- https://github.com/hypothesis/browser-extension for the browser extension
- To get “direct” or “in context” links working you need to install Bouncer and Via:
Development environment troubleshooting if you run into any problems during installation
You will need¶
Before installing your development environment you’ll need to install each of these prerequisites:
- Node and npm. On Linux you should follow nodejs.org’s instructions for installing node because the version of node in the standard Ubuntu package repositories is too old. On macOS you should use Homebrew to install node.
- Docker. Follow the instructions on the Docker website to install “Docker Engine - Community”.
- 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/h.git
This will download the code into an
h directory in your current working
directory. You need to be in the
h directory from the remainder of the
Run the services with Docker Compose¶
Start the services that h requires using Docker Compose:
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 client assets.
This will start the server on port 5000 (http://localhost:5000), 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 h development environment.
make help to see all the commands that’re available for running the
tests, linting, code formatting, Python and SQL shells, etc.