router.go 202 B

123456789101112131415
  1. package routers
  2. import (
  3. "github.com/gin-gonic/gin"
  4. "net/http"
  5. )
  6. func InitRouter() {
  7. r := gin.New()
  8. r.GET("/", func(c *gin.Context) { c.String(http.StatusOK, "hello!") })
  9. _ = r.Run(":8080")
  10. }