Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Main is the entry for front application. Main = gcmd.Command{ Name: "main", Usage: "main", Brief: "start HTTP server", Func: func(ctx context.Context, parser *gcmd.Parser) (err error) { s := g.Server() s.SetRewrite("/favicon.ico", "/resource/image/favicon.ico") s.Group("/", func(group *ghttp.RouterGroup) { group.Middleware(ghttp.MiddlewareCORS, service.Middleware().Initializer, service.Middleware().ClientIP, service.Middleware().RequestLog, service.Middleware().Logger, service.Middleware().HandlerResponse) group.ALL("/", comment.NewV1().Compatible) group.GET("/count", comment.NewV1().CompatibleCount) group.Group("/api.v1/front", func(group *ghttp.RouterGroup) { group.Bind( authorize.NewV1(), ) group.Bind( comment.NewV1(), ) }) }) s.Run() return nil }, } )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.