2024-10-28 20:22:44 +01:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"log"
|
|
|
|
"net/http"
|
|
|
|
|
|
|
|
"github.com/go-chi/chi/v5"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2024-10-30 00:03:39 +01:00
|
|
|
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))
|
|
|
|
}
|