From a94d4ccd6377172548c84a4730b8fdebbe43883d Mon Sep 17 00:00:00 2001 From: Jonathan Zernik Date: Fri, 1 Jan 2021 22:21:27 -0800 Subject: [PATCH] Simplify frontend readme (#539) * Simplify frontend readme * Fix bitcoin user and pass configs in frontend readme --- frontend/README.md | 38 +++++++------------------------------- 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/frontend/README.md b/frontend/README.md index f76fa6d7..6fd18f0b 100755 --- a/frontend/README.md +++ b/frontend/README.md @@ -1,54 +1,30 @@ # frontend -## Build protos - -- Install `protoc` and `protoc-gen-grpc-web`: - https://github.com/grpc/grpc-web#code-generator-plugin - ``` - curl -sSL https://github.com/protocolbuffers/protobuf/releases/download/v3.12.2/protoc-3.12.2-linux-x86_64.zip -o protoc.zip && \ - unzip -qq protoc.zip && \ - cp ./bin/protoc /usr/local/bin/protoc - - curl -sSL https://github.com/grpc/grpc-web/releases/download/1.2.1/protoc-gen-grpc-web-1.2.1-linux-x86_64 -o /usr/local/bin/protoc-gen-grpc-web && \ - chmod +x /usr/local/bin/protoc-gen-grpc-web - ``` -- Run `./build-protos.sh` - ## Run in dev mode -- [Build protos](#build-protos) - Start bitcoin-core and lnd in docker-compose: ``` - $ cd ../docker + $ cd docker $ docker-compose up ``` -- Start the squeak node backend with the `SQUEAKNODE_WEBADMIN_ENABLED`, `SQUEAKNODE_WEBADMIN_LOGIN_DISABLED`, and `SQUEAKNODE_WEBADMIN_ALLOW_CORS` environment variables: +- Start the backend with the `SQUEAKNODE_WEBADMIN_ENABLED`, `SQUEAKNODE_WEBADMIN_LOGIN_DISABLED`, and `SQUEAKNODE_WEBADMIN_ALLOW_CORS` environment variables: ``` - $ cd .. $ virtualenv venv $ source venv/bin/activate $ pip install -r requirements.txt $ python setup.py install - $ SQUEAKNODE_WEBADMIN_ENABLED=TRUE SQUEAKNODE_WEBADMIN_LOGIN_DISABLED=TRUE SQUEAKNODE_WEBADMIN_ALLOW_CORS=TRUE SQUEAKNODE_NETWORK=testnet runsqueaknode run-server + $ SQUEAKNODE_WEBADMIN_ENABLED=TRUE SQUEAKNODE_WEBADMIN_LOGIN_DISABLED=TRUE SQUEAKNODE_WEBADMIN_ALLOW_CORS=TRUE SQUEAKNODE_NETWORK=testnet runsqueaknode --config config.ini run-server ``` -- Run the frontend in development mode: +- Start the frontend in development mode: ``` + $ cd frontend $ make rundev ``` ## Build for production -- [Build protos](#build-protos) -- Make the build: - ``` - $ npm install - $ npm run build - ``` -- Copy the generated `build` folder into `squeaknode/admin/webapp/static/`. - ``` - $ cp -r build/ ../squeaknode/admin/webapp/static/ - ``` -Or run the following instead: +- Run the build command: ``` + $ cd frontend $ make build ```