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 context.Context, parser *gcmd.Parser) (err error) { s := g.Server() Mcp(ctx, s) s.Group("/", func(group *ghttp.RouterGroup) { s.AddStaticPath("", "./static/fe/") s.SetIndexFiles([]string{"index.html"}) }) s.Group("/api", func(group *ghttp.RouterGroup) { group.Middleware(MiddlewareHandlerResponse, ghttp.MiddlewareCORS) group.Bind( rag.NewV1(), ) }) s.Run() return nil }, } )
Functions ¶
func MiddlewareHandlerResponse ¶
MiddlewareHandlerResponse is the default middleware handling handler response object and its error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.