bigest part of the api done

This commit is contained in:
2022-01-30 05:39:57 +01:00
commit 7585a53baa
38 changed files with 11551 additions and 0 deletions

23
server/server.go Normal file
View File

@@ -0,0 +1,23 @@
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()
}