2025-06-30 12:37:33 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
import (
|
2025-06-30 12:37:33 +02:00
|
|
|
"fmt"
|
2025-06-30 12:37:33 +02:00
|
|
|
"net/http"
|
|
|
|
|
|
2025-06-30 12:37:33 +02:00
|
|
|
"github.com/joho/godotenv"
|
2025-06-30 12:37:33 +02:00
|
|
|
_ "github.com/mattn/go-sqlite3"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func main() {
|
2025-06-30 12:37:33 +02:00
|
|
|
godotenv.Load(".env")
|
|
|
|
|
|
2025-06-30 12:37:33 +02:00
|
|
|
ntfy := SetupNtfyClient()
|
|
|
|
|
|
|
|
|
|
db := SetupDatabase()
|
|
|
|
|
SetupRsvpsTable(db)
|
|
|
|
|
|
2025-06-30 12:37:33 +02:00
|
|
|
SetupAuth()
|
2025-06-30 12:37:33 +02:00
|
|
|
hnd := &Handler{db, ntfy}
|
2025-06-30 12:37:33 +02:00
|
|
|
fmt.Println("handler ready")
|
|
|
|
|
|
2025-06-30 12:37:33 +02:00
|
|
|
http.ListenAndServe(":8000", hnd)
|
|
|
|
|
}
|