feat: Sprint 0 — GoFiber + HTMX + TailwindCSS v4 scaffolding
- Go module: git.tukangketik.id/swanadiva/hostkeeper/v2 - GoFiber v2 server with static, template engine, middleware - HTMX + Alpine.js (downloaded from CDN) - TailwindCSS v4 with custom theme (Lumina System colors) - Custom CSS: dot-grid, glassmorphism, animations, toggle, modal - Layout template (sidebar nav + header + main) - Dashboard page with host list, search, filter, view toggle - Health endpoint: GET /api/health
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/middleware/compress"
|
||||
"github.com/gofiber/fiber/v2/middleware/logger"
|
||||
"github.com/gofiber/fiber/v2/middleware/recover"
|
||||
"github.com/gofiber/template/html/v2"
|
||||
|
||||
"git.tukangketik.id/swanadiva/hostkeeper/v2/internal/handler"
|
||||
)
|
||||
|
||||
func main() {
|
||||
engine := html.New("./views", ".html")
|
||||
engine.Reload(true)
|
||||
engine.AddFunc("svg", func(name string) string {
|
||||
return "" // TODO: inline SVG icons
|
||||
})
|
||||
|
||||
app := fiber.New(fiber.Config{
|
||||
Views: engine,
|
||||
})
|
||||
|
||||
app.Use(logger.New())
|
||||
app.Use(recover.New())
|
||||
app.Use(compress.New())
|
||||
app.Static("/static", "./static")
|
||||
|
||||
app.Get("/", handler.Dashboard)
|
||||
app.Get("/hosts", handler.Dashboard)
|
||||
app.Get("/api/health", handler.Health)
|
||||
|
||||
log.Fatal(app.Listen(":1947"))
|
||||
}
|
||||
Reference in New Issue
Block a user