package main import ( "fmt" "net/http" "sirlab.de/go/knyt/app" "sirlab.de/go/knyt/engine" "sirlab.de/go/knyt/handler" ) func main() { appConfig := app.NewAppConfig() App := app.NewApp(appConfig) App.Mux = handler.NewAuthMux() App.Eng = engine.NewEngine() http.Handle("/", App.Mux) App.Mux.PublicHandleFunc("/__intern__/exit", handler.Exit) // default handler fsHandler := http.FileServer(http.Dir("../client/dist/")) App.Mux.PublicHandle("/", fsHandler) App.Mux.PublicHandleFunc("/api/sync", App.Eng.GetHttpHandler()) go App.Eng.Run() // start listening fmt.Println("http://localhost:32039") http.ListenAndServe(":32039", nil) }