main.go 332 B

12345678910111213141516171819202122232425
  1. package main
  2. import (
  3. "demo/configs"
  4. "demo/router"
  5. "github.com/gin-gonic/gin"
  6. )
  7. func init() {
  8. configs.ConfigInit()
  9. }
  10. func main() {
  11. runGin()
  12. }
  13. // 接口前缀
  14. func runGin() {
  15. Router := gin.Default()
  16. apiGroup := Router.Group(router.Prefix)
  17. router.InitRouter(apiGroup)
  18. router.InitAuthority(Router)
  19. Router.Run(":8182")
  20. }