package main import ( "log" "net/http" // "streifling.com/jason/sicherheitsunterweisung/db" "streifling.com/jason/sicherheitsunterweisung/server" ) func main() { var i, j int64 var b server.Briefing i, j = 1, 1 mux := http.NewServeMux() /* _, err := db.OpenDB("sicherheitsunterweisung") if err != nil { log.Fatalln(err) } */ mux.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static/")))) mux.HandleFunc("/", server.DisplayForm(&i)) mux.HandleFunc("/add-participant/", server.AddParticipant(&i)) mux.HandleFunc("/submit/", server.SubmitForm(&b, &i, &j)) log.Fatalln(http.ListenAndServe(":8080", mux)) }