45 Star 552 Fork 170

联犀/物联网iot模块

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
api.go 629 Bytes
一键复制 编辑 原始数据 按行查看 历史
杨磊 提交于 2025-02-14 22:56 +08:00 . style: 规范命名
// api网关接口代理模块-apisvr
package main
import (
"context"
"fmt"
"gitee.com/unitedrhino/share/utils"
"gitee.com/unitedrhino/things/service/apisvr/export"
"github.com/zeromicro/go-zero/core/logx"
_ "github.com/zeromicro/go-zero/core/proc" //开启pprof采集 https://mp.weixin.qq.com/s/yYFM3YyBbOia3qah3eRVQA
)
func main() {
defer utils.Recover(context.Background())
logx.DisableStat()
apiCtx := export.NewApi(export.ApiCtx{})
apiCtx.Server.PrintRoutes()
fmt.Printf("Starting apiSvr at %s:%d...\n", apiCtx.SvcCtx.Config.Host, apiCtx.SvcCtx.Config.Port)
defer apiCtx.Server.Stop()
apiCtx.Server.Start()
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/unitedrhino/things.git
git@gitee.com:unitedrhino/things.git
unitedrhino
things
物联网iot模块
v1.5.73

搜索帮助