Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Main = gcmd.Command{ Name: "main", Usage: "main", Brief: "start http server", Func: func(ctx g.Ctx, parser *gcmd.Parser) (err error) { s := g.Server() s.Use(router.MiddlewareCORS) s.Group("/", func(group *ghttp.RouterGroup) { router.BindController(group) }) enhanceOpenAPIDoc(s) if cachecfg.IsEnabled() { go preloadCache() } s.Run() return nil }, } )
Main is the entry-point CLI command that starts the HTTP server with CORS middleware and OpenAPI docs. 主命令入口,启动 HTTP 服务器并挂载 CORS 中间件与 OpenAPI 文档。
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.