From b5d82c103752d544721988182a51e4535bac616a Mon Sep 17 00:00:00 2001 From: Eric Helgeson Date: Sun, 23 May 2021 10:55:24 -0500 Subject: [PATCH] Update readme for dev setup of web --- src/web/README.md | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/src/web/README.md b/src/web/README.md index 82088ba2..352e5ce3 100644 --- a/src/web/README.md +++ b/src/web/README.md @@ -1,12 +1,35 @@ # RaSCSI Web -## Mocking for local development +## Setup local dev env -Set a few env vars to point to the mock scripts and base dir - -``` -BASE_DIR=/tmp/images/ -PATH=$PATH:`pwd`/mock/bin/ +```bash +# Make a virtual env named venv +$ python3 -m venv venv +# Use that virtual env in this shell +$ source venv/bin/activate +# Install requirements +$ pip install -r requirements.txt +# Use mocks and a temp dir - start the web server +$ BASE_DIR=/tmp/images/ PATH=$PATH:`pwd`/mock/bin/ python3 web.py ``` -Edit response to commands in `mock/bin/*` +### Mocks for local development + +You may edit the files under `mock/bin` to simulate rascsi command responses. + +## Pushing to the Pi via git + +Setup a bare repo on the rascsi +``` +$ ssh pi@rascsi +$ mkdir /home/pi/dev.git && cd /home/pi/dev.git +$ git --bare init +Initialized empty Git repository in /home/pi/dev.git +``` + +Locally +``` +$ cd ~/source/RASCSI +$ git remote add pi ssh://pi@rascsi/home/pi/dev.git +$ git push pi master +```