8000 GitHub - neldredge/viewer: Prototype rich Pi-Base frontend w/ React
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

neldredge/viewer

 
 

Repository files navigation

pi-Base Viewer

CircleCI

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:

Initial setup

  • Install docker and docker-compose
  • Copy .env.server.example to .env.server and change the values as needed
  • Run 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 {"version":"VERSION_HASH"}.

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

See the 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 LOG_ variables.
  • Suggested directory structure is
    pi-base
    ├── data
    ├── server # if desired
    └── viewer
  • By default, we mount the ../data directory 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

(Prefacing with 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:

Installing node

We recommend installing nvm to manage node versions. We are currently developing against lts/carbon, and intend to track the most recent lts.

Installing yarn

We use 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 at http://localhost:3000.

About

Prototype rich Pi-Base frontend w/ React

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 60.4%
  • JavaScript 22.1%
  • CSS 16.1%
  • HTML 1.4%
0