package main

import (
	"fmt"
	"log"
	"net/http"

	"github.com/go-chi/chi/v5"
)

func main() {
	fmt.Println("Programm wurde gestartet :)")
	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))
}
