var db gorm.DB
func main() {
router := httprouter.New()
dbConnect, err := gorm.Open("mysql", "root:parsh888@/generais?charset=utf8&parseTime=True&loc=Local")
dbConnect.DB()
dbConnect.DB().Ping()
dbConnect.DB().SetMaxIdleConns(10)
dbConnect.DB().SetMaxOpenConns(100)
dbConnect.SingularTable(true)
if err != nil {
log.Fatal(err)
}
db = dbConnect
router.GET("/auth", kontroller.Auth)
log.Fatal(http.ListenAndServe(":8080", router))
}