package main import ( "fmt" "net/http" "sirlab.de/go/knyt/application" "sirlab.de/go/knyt/handler" ) func main() { appConfig := application.NewApplicationConfig() app := application.NewApplication(appConfig) mux := handler.NewAuthMux(app) mux.PublicHandleFunc("/__intern__/exit", handler.Exit) // default handler fsHandler := http.FileServer(http.Dir("../../client/dist/")) mux.PrivateHandle("/private/", fsHandler) mux.PublicHandle("/", fsHandler) // start listening fmt.Printf("http://localhost:%d/\n", mux.Port) mux.ListenAndServe() }