Skip to content

demo service

henry.huang edited this page Mar 16, 2021 · 1 revision

demo service

示例服务说明:

app/basic/demo

  • run 示例服务: app/basic/demo
cd ./app/basic/demo

# 启动 API 服务:
make run.demo

########################################################################################
#
# 或者使用: 基于 air, watch 该服务目录, 修改后, 自动 hot reload, 无需重新编译
#
########################################################################################

# 启动 http api sever:
make run.auto.api

# 启动 internal rpc sever:
make run.auto.svc

# 启动 job sever:
make run.auto.job

# 启动 admin api sever:
make run.auto.admin

########################################################################################

# http echo test:
make curl.api


#
# will print:
#
-> % make curl.api
curl -i http://localhost:8888/from/you
HTTP/1.1 200 OK
Content-Type: application/json
Date: Thu, 18 Feb 2021 10:48:23 GMT
Content-Length: 25

{"message":"hello world"}%
Clone this wiki locally