tailwind and docker update
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/dryrun Pipeline was successful
ci/woodpecker/push/publish-tag Pipeline was successful
ci/woodpecker/push/publish-latest Pipeline was successful

This commit is contained in:
2024-06-09 16:21:41 -04:00
parent 2733d2c19e
commit 44feca12d2
10 changed files with 694 additions and 6 deletions

View File

@@ -3,6 +3,7 @@ package main
import (
"log"
"net/http"
"path/filepath"
"github.com/a-h/templ"
"michaelthomson.dev/mthomson/go-todos-app/views"
@@ -11,6 +12,13 @@ import (
func main() {
router := http.NewServeMux()
// Serve static files
router.HandleFunc("GET /assets/", func(w http.ResponseWriter, r *http.Request) {
filePath := r.URL.Path[len("/assets/"):]
fullPath := filepath.Join(".", "assets", filePath)
http.ServeFile(w, r, fullPath)
})
home := views.Home()
router.Handle("GET /", templ.Handler(home))