collinenlucy.nl/main.go

25 lines
326 B
Go
Raw Normal View History

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