master.go 459 B

12345678910111213141516171819202122
  1. package main
  2. import (
  3. "be-vpn/internal/server"
  4. "github.com/gin-gonic/gin"
  5. "log"
  6. )
  7. func main() {
  8. r := gin.Default()
  9. r.Use(gin.Recovery())
  10. r.Static("/static", "./static")
  11. r.POST("/register", server.Register)
  12. r.GET("/group", server.Group) // 天实云海
  13. r.GET("/v2/group", server.V2Group) // sweeter life
  14. r.GET("/secret", server.Secret)
  15. r.GET("/health", server.Health)
  16. if err := r.Run(":80"); err != nil {
  17. log.Fatalf("err: %+v", err)
  18. }
  19. }