Warning, /drich-dev/doc/jsroot.md is written in an unsupported language. File is not indexed.
0001 ### Locally Hosting JSroot
0002
0003 It is convenient to locally run JSroot, so you can automate opening and viewing
0004 the geometry. Follow the [JSroot documentation](https://github.com/root-project/jsroot/blob/master/docs/JSROOT.md)
0005 to learn how to set custom settings with URLs, and much more.
0006
0007 First either obtain a release or clone the JSroot repository; you can
0008 clone it to any directory (does not have to be in `drich-dev/`)
0009 ```
0010 git clone https://github.com/root-project/jsroot.git
0011 ```
0012 Then `cd` to this `jsroot` directory. Make a symlink to the `drich-dev/geo`
0013 directory, so that your local HTTP server can access ROOT files within:
0014 ```
0015 ln -sv /path/to/drich-dev/geo ./
0016 ```
0017 Now start an HTTP server. For example, using python:
0018 ```
0019 python -m http.server
0020 ```
0021 Note which port is used, likely `8000`. Now open your browser and open the URL
0022 <http://localhost:8000> to start JSroot in the browser (change the port number
0023 if yours is different)
0024
0025 Various settings can be set via the URL. For example, the following URL
0026 automatically opens the `detector_geometry.root` file (produced by
0027 `geometry.sh`) using `file=...`, and enables dark mode:
0028
0029 <http://localhost:8000/?file=geo/detector_geometry.root&dark>