go-gallery/main.go
2018-04-12 17:41:21 +08:00

23 lines
334 B
Go

package main
import (
"log"
"git.trj.tw/golang/go-gallery/models"
"git.trj.tw/golang/go-gallery/routers/routes"
"github.com/gin-gonic/gin"
)
var server *gin.Engine
func main() {
server = routes.NewServ()
_, err := models.NewDB()
if err != nil {
log.Fatal(err)
}
routes.SetDefaultRoutes(server)
server.Run(":10230")
}