Instruction on antd ui + go rest server
Run UI with mock
cd calc && \
yarn && \
yarn start
Run UI with rest server
Using local server
cd $GOPATH/src/gitlab.com/tech-refs/antd/instructions/008-antd-pro-+-go-rest-server/rest-server && \
go get ./... && \
go run main.go
Using lambdas
cd rest-server
now
Config proxy
To use local rest server or lambdas we need to set up proxy. Add lines to /calc/config/config.js (specify server url at the target property)
proxy: {
'/api': {
target: 'https://calc-go.sanctaignis.now.sh/',
changeOrigin: true,
pathRewrite: { '^/api' : '' }
}
},
Run UI
cd calc && \
yarn && \
yarn start:no-mock