You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
522 B

9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
  1. package cmd
  2. import (
  3. "context"
  4. "xgit.pub/module/cms/app"
  5. "github.com/gogf/gf/v2/frame/g"
  6. "github.com/gogf/gf/v2/net/ghttp"
  7. "github.com/gogf/gf/v2/os/gcmd"
  8. )
  9. var (
  10. Main = gcmd.Command{
  11. Name: "main",
  12. Usage: "main",
  13. Brief: "start http server",
  14. Func: func(ctx context.Context, parser *gcmd.Parser) (err error) {
  15. s := g.Server()
  16. s.Group("/", func(group *ghttp.RouterGroup) {
  17. group.Middleware(ghttp.MiddlewareHandlerResponse)
  18. _ = app.RegeditPlugin(group)
  19. })
  20. s.Run()
  21. return nil
  22. },
  23. }
  24. )