main.go 349 B

1234567891011121314151617
  1. package main
  2. import (
  3. "fmt"
  4. "github.com/gin-gonic/gin"
  5. "youngee_b_api/config"
  6. _ "youngee_b_api/docs"
  7. "youngee_b_api/route"
  8. )
  9. func main() {
  10. r := gin.Default()
  11. route.InitRoute(r)
  12. config := config.Init()
  13. addr := fmt.Sprintf("%v:%v", config.Host, config.Port)
  14. r.Run(addr) // listen and serve on 0.0.0.0:8080 (for windows "localhost:8080")
  15. }