This documentation assumes both jbrowse-components and Apollo3 are cloned
side-by-side:
git clone https://github.com/GMOD/jbrowse-components
git clone https://github.com/GMOD/Apollo3You'll need yarn to be installed.
You then have two options to start Apollo3 for development purposes. In both cases, the instance is then accessible via
http://localhost:3000/?config=http://localhost:3999/jbrowse/config.json
If you use Visual Studio Code, you can leverage the Dev Containers extension.
You'll need docker to be installed.
- Run
yarnat the root of both repositories, this only needs to be ran once after cloning (alternatively, run thejust setuprecipe, see below). - Run
yarn startfromjbrowse-components/products/jbrowse-web(alternatively, run thejust run-jbrowserecipe). - Open the Apollo3 project in Visual Studio Code.
- Use the Dev Containers: Reopen in Container command in VS Code
(
Ctrl + Shift + Pto search for commands). - Use the Task: Run Task -> Start command in VS Code
You'll need a MongoDB server running. For convenience, a justfile leveraging
the just command runner is provided. just
commands can be executed from anywhere within your local clone of Apollo3. You
can run just to get a list of available recipes.
- Run
just setup(only once after cloning). - Run
just run(this automatically startsjbrowseand the Apollo components).
You can also define your own recipes in a user.just file, they will be added
to the list of available recipes. For instance, on a Linux system, you might
find the following recipes useful to have in your user.just file:
# start mongodb server
start-mongodb:
sudo systemctl start mongodb.service
# open in browser
open:
xdg-open http://localhost:3000/?config=http://localhost:3999/jbrowse/config.json