@abtnode/schema 中文文档教程
Core Schema
定义 ABT 节点后端 API 的数据结构,并维护 GQL 端点的架构。
Development
Install gun-sed
- Mac: brew install gnu-sed
- Other platform: https://www.gnu.org/software/sed/
Install protobuf
- Mac: brew install protobuf
- Other platform: https://developers.google.com/protocol-buffers/docs/downloads
Add to ~/.profile
export GO111MODULE=on
export GOPROXY=https://goproxy.cn
export GOROOT=/usr/local/Cellar/go/1.15.5/libexec // you local go path
export GOPATH=$HOME/.golang
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOROOT:$GOPATH:$GOBIN
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"
source ~/.profile
Install other dependencies
运行 make init
如果网络有问题,尝试通过 https://goproxy.cn/ 更改golang registry
Build Schema
运行 make build
How To Update Schema
1. update core/schema proto
更新schema后proto,运行 make build
得到最新的模式。
如果您使用的是 mac,您可能需要将
sed
命令替换为gsed
2. go to core/webapp start a demo endpoint
只需运行:
node tools/start-upgrade-server.js
应确保 DB Proxy 正在运行
3. go to core/client do finally update
,只需运行:
npm run upgrade
4. finish the update
Core Schema
Defines data structure for ABT Node backend API, and maintains schema for GQL endpoint.
Development
Install gun-sed
- Mac: brew install gnu-sed
- Other platform: https://www.gnu.org/software/sed/
Install protobuf
- Mac: brew install protobuf
- Other platform: https://developers.google.com/protocol-buffers/docs/downloads
Add to ~/.profile
export GO111MODULE=on
export GOPROXY=https://goproxy.cn
export GOROOT=/usr/local/Cellar/go/1.15.5/libexec // you local go path
export GOPATH=$HOME/.golang
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOROOT:$GOPATH:$GOBIN
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"
source ~/.profile
Install other dependencies
Run make init
If there is a network problem, try to change golang registry by https://goproxy.cn/
Build Schema
Run make build
How To Update Schema
1. update core/schema proto
After update the schema proto, run make build
get the latest schema.
If you are using mac, you may need replace the
sed
command withgsed
2. go to core/webapp start a demo endpoint
just run:
node tools/start-upgrade-server.js
should make sure the DB Proxy is running
3. go to core/client do finally update
just run:
npm run upgrade
4. finish the update
更多
你可能也喜欢
- @0x-klaytn/asset-swapper 中文文档教程
- @0x/tslint-config 中文文档教程
- @0xcert/web3-error-parser 中文文档教程
- @12stonechurch/react-native-chromecast 中文文档教程
- @3t-transform/tf-ng-nz 中文文档教程
- @8base/apollo-provider 中文文档教程
- @927akshay/web-server 中文文档教程
- @a11you/my-js-project 中文文档教程
- @aaronpowell/react-static-web-apps-auth 中文文档教程
- @aasaam/brand-icons 中文文档教程