mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-13 12:33:25 +02:00
Organize frontend (#346)
* Remove intermediate squeak-node-frontend dir * Create build-protos.sh * Fix build-protos script in readme
This commit is contained in:
parent
927299cef0
commit
f8cda6fef2
173 changed files with 24 additions and 6 deletions
|
|
@ -1,7 +1,14 @@
|
|||
# frontend
|
||||
|
||||
## Build protos
|
||||
|
||||
- Install `protoc` and `protoc-gen-grpc-web`:
|
||||
https://github.com/grpc/grpc-web#code-generator-plugin
|
||||
- Run `./build-protos.sh`
|
||||
|
||||
## Run in dev mode
|
||||
|
||||
- [Build protos](#build-protos)
|
||||
- Edit **config.ini** and add the following configs in the `webadmin` section
|
||||
```
|
||||
login_disabled=true
|
||||
|
|
@ -10,14 +17,16 @@
|
|||
- Start the squeak server.
|
||||
- Start the frontend in dev mode with the `REACT_APP_SERVER_PORT` environment variable.
|
||||
```
|
||||
$ npm install
|
||||
$ REACT_APP_SERVER_PORT=12994 npm start
|
||||
```
|
||||
|
||||
## Build
|
||||
|
||||
- Install `protoc` and `protoc-gen-grpc-web`:
|
||||
https://github.com/grpc/grpc-web#code-generator-plugin
|
||||
|
||||
- Run `make-build.sh`
|
||||
## 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/`.
|
||||
9
frontend/build-protos.sh
Executable file
9
frontend/build-protos.sh
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
cp -r ../proto src/
|
||||
|
||||
(cd src && \
|
||||
protoc -I=. proto/squeak_admin.proto proto/lnd.proto \
|
||||
--js_out=import_style=commonjs:. \
|
||||
--grpc-web_out=import_style=commonjs,mode=grpcwebtext:.)
|
||||
|
||||
./pb_disable-eslint.sh src/proto/
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue