package main

import (
	"demo/configs"
	"demo/router"
	"demo/share"
	"demo/user"
	"github.com/gin-gonic/gin"
)

func init() {
	configs.ConfigInit()
}
func main() {
	runGin()
}
func runGin() {
	Router := gin.Default()

	apiGroup := Router.Group("/api")

	user.UserRouth(apiGroup)

	router.InitRouter(apiGroup)
	apiGroup.GET("/ping", share.JwtMiddleware(), func(context *gin.Context) {
		context.String(200, "pong")
	})
	Router.Run(":8182")
}
