Defines data structure for Blocklet Server backend API, and maintains schema for GQL endpoint.
- Mac: brew install gnu-sed
- Other platform: https://www.gnu.org/software/sed/
- Mac: brew install protobuf
- Other platform: https://developers.google.com/protocol-buffers/docs/downloads
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
Run make init
If there is a network problem, try to change golang registry by https://goproxy.cn/
Run make build
After update the schema proto, run make build
get the latest schema.
just run:
node demo.js
should make sure the DB Proxy is running
just run:
npm run upgrade