如何启动 dubbo-go-pixiu
cd samples/dubbo/simple
我们可以使用 start.sh 快速运行示例。如需更多信息,请执行以下命令获取帮助
./start.sh [action] [project]
./start.sh help
下面我们分步运行 body 示例
prepare 命令会准备 dubbo-server 和 pixiu 的配置文件,并启动所需的 docker 容器
./start.sh prepare body
如果手动准备配置文件,请注意:
./start.sh startServer body
./start.sh startPixiu body
如果手动运行 pixiu,请使用以下命令
go run cmd/pixiu/*.go gateway start -c /[absolute-path]/dubbo-go-pixiu/samples/dubbo/simple/body/pixiu/conf.yaml
使用 curl 尝试或运行单元测试
curl -X POST 'localhost:8881/api/v1/test-dubbo/user' -d '{"id":"0003","code":3,"name":"dubbogo","age":99}' --header 'Content-Type: application/json'
./start.sh startTest body
./start.sh clean body