This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user