You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
413 B
Go

package server
import (
"net/http"
"github.com/gin-contrib/static"
"github.com/gin-gonic/gin"
"spahl.ddns.net/jasper/wok-able-backend/controllers"
)
var httpServer *http.Server
var httpRouter *gin.Engine
func Setup() {
httpRouter = gin.New()
httpRouter.Use(gin.Logger())
httpRouter.Use(static.Serve("/", static.LocalFile("./assets/build", false)))
controllers.Setup(httpRouter)
httpRouter.Run()
}