GA / main.go
Niansuh's picture
Upload 19 files
7d06702 verified
raw
history blame contribute delete
471 Bytes
package main
import (
"fmt"
"github.com/gin-gonic/gin"
"github.com/zbronya/free-chat-to-api/config"
"github.com/zbronya/free-chat-to-api/logger"
"github.com/zbronya/free-chat-to-api/router"
)
func main() {
gin.SetMode(gin.ReleaseMode)
g := gin.New()
g.Use(gin.Recovery())
router.InitRouter(g)
host := config.Bind
logger.GetLogger().Info(fmt.Sprint("Server started on http://", host, ":", config.Port))
_ = g.Run(fmt.Sprint(config.Bind, ":", config.Port))
}