Migrated project to use golang.

This commit is contained in:
2026-04-14 08:08:54 +02:00
parent 44fb025c81
commit dbf7858afd
18 changed files with 762 additions and 906 deletions
+23
View File
@@ -0,0 +1,23 @@
package main
import (
"log"
"net/http"
"jh/website/internal/handlers"
)
func main() {
mux := http.NewServeMux()
// Resolve static dir relative to the binary's location
mux.Handle("GET /static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static"))))
// Routes
mux.HandleFunc("GET /", handlers.Home)
log.Println("Server starting on http://localhost:8080")
if err := http.ListenAndServe(":8080", mux); err != nil {
log.Fatal(err)
}
}