mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-13 12:33:25 +02:00
Simplify frontend readme (#539)
* Simplify frontend readme * Fix bitcoin user and pass configs in frontend readme
This commit is contained in:
parent
bf57996607
commit
a94d4ccd63
1 changed files with 7 additions and 31 deletions
|
|
@ -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
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue