This project was bootstrapped with Create React App. Please see that documentation for more information on common project tasks.
Setting up the server
Developing the viewer requires a copy of the pi-base server running locally. The easiest way to set this up is using Docker:
- Install docker and docker-compose
.env.serverand change the values as needed
docker-compose up server(or possibly
sudo docker-compose up server) to start the server
Once everything has finished building (which may take a while on first load),
visiting http://localhost:3141 should respond with
Running the server
docker-compose up server or
sudo docker-compose up server
should be sufficient to run the server subsequently. If the server's
Docker image has been updated,
docker-compose pull or
sudo docker-compose pull will update your local image.
Configuring the server
docker-compose.yml file for the specifics of what is running and options for configuring. Of particular note:
- You can control the server log settings by adjusting the various
- Suggested directory structure is
pi-base ├── data ├── server # if desired └── viewer
- By default, we mount the
../datadirectory inside the server container and store the data repository there. You can adjust where that data is located by mounting a different directory in the container at
/data(or remove the mount).
Inspecting the server
sudo as needed) run
docker ps to obtain the active
CONTAINER ID and use
docker run -i <CONTAINER ID> -t /bin/bash to obtain an interactive
shell inside the server.
Setting up the viewer
You can run the viewer using docker as well (
docker-compose up) but the
development experience is better if you run it locally:
We recommend installing
nvm to manage
node versions. We are currently developing against
lts/carbon, and intend to track the most recent lts.
- Install NVM using the script provided at https://github.com/creationix/nvm#installation
nvm install lts/carbonto install
nvm use lts/carbonto set the default version of node
yarn as a package manager to ensure consistent builds. You can install
yarn by following the directions at https://yarnpkg.com/lang/en/docs/install/
Running the viewer
The first time you start the viewer (and any time your packages are updated),
you should run
yarn install and
yarn run schema.
Once all packages are installed, run
yarn run start to start the server.
After a short build process, your browser should open a copy of the viewer