Make a nice splash page

This commit is contained in:
Jon Staab
2025-10-01 08:12:50 -07:00
parent fcf873690f
commit 9c62dff15e
4 changed files with 186 additions and 1 deletions
+5
View File
@@ -87,6 +87,9 @@ func MakeInstance(filename string) (*Instance, error) {
instance.Relay.RejectConnection = instance.RejectConnection
instance.Relay.PreventBroadcast = instance.PreventBroadcast
// Todo: when there's a new version of khatru
// instance.Relay.StartExpirationManager()
// HTTP request handling
router := instance.Relay.Router()
@@ -95,6 +98,8 @@ func MakeInstance(filename string) (*Instance, error) {
http.ServeFile(w, r, "templates/index.html")
})
router.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static"))))
// Initialize stuff
if err := instance.Events.Init(); err != nil {