fah/main.go

20 lines
411 B
Go
Raw Permalink Normal View History

2024-10-28 20:22:44 +01:00
package main
import (
"fmt"
"log"
"net/http"
"github.com/go-chi/chi/v5"
)
func main() {
fmt.Println("Programm wurde gestartet :)")
2024-10-28 20:22:44 +01:00
router := chi.NewRouter()
router.Use(jsonHeaderMiddleware)
router.Post("/api/passwort", postPasswort)
router.Post("/api/handy", postHandy)
router.Handle("/*", http.StripPrefix("/", http.FileServer(http.Dir("www"))))
log.Fatal(http.ListenAndServe(":8000", router))
}