README
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
~/.profile
Add to 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