add templates for kontor-gin
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 6s

This commit is contained in:
Thomas Peetz
2026-09-21 19:55:46 +02:00
parent 652aa3005b
commit f2f4a0aaf6
28 changed files with 787 additions and 41 deletions
+1
View File
@@ -21,5 +21,6 @@ RUN apk add --no-cache ca-certificates tzdata curl
# Copy the binary and set ownership
COPY --from=builder /app/kontor /app/kontor
COPY --from=builder /app/views /app/views
COPY --from=builder /app/static /app/static
# Set the entrypoint command
ENTRYPOINT ["/app/kontor"]
+2 -2
View File
@@ -32,7 +32,7 @@ func main() {
app.Get("/health", handler.GetHealth)
app.Post("/login", handler.Login)
app.Get("/", web.Mainpage)
web.SetupRoutes(app)
//api := app.Group("/api/v1")
api := app.Group("/api/v1", logger.New(), jwtware.New(jwtware.Config{
@@ -54,7 +54,7 @@ func main() {
},
}))
// Listen on port 8900
app.Listen(":8510")
app.Listen(":8500")
log.Println("Kontor finished")
}
+12
View File
@@ -0,0 +1,12 @@
package web
import (
"github.com/gofiber/fiber/v3"
)
func SetupRoutes(app *fiber.App) {
app.Get("/", Mainpage)
app.Get("/comic/comics", Mainpage)
app.Get("/media/files", Mainpage)
}