summaryrefslogtreecommitdiffstats
path: root/roseh.moe.go
diff options
context:
space:
mode:
Diffstat (limited to 'roseh.moe.go')
-rw-r--r--roseh.moe.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/roseh.moe.go b/roseh.moe.go
index ce66f73..5ce4258 100644
--- a/roseh.moe.go
+++ b/roseh.moe.go
@@ -47,6 +47,17 @@ func index(w http.ResponseWriter, _ *http.Request) {
}
}
+//go:embed templates/pong.html.template
+var pongString string
+
+var pongTemplate = template.Must(template.New("pong").Parse(pongString))
+
+func pong(w http.ResponseWriter, _ *http.Request) {
+ if err := pongTemplate.Execute(w, nil); err != nil {
+ log.Printf("Warning: pong: %s", err)
+ }
+}
+
//go:embed static
var staticFiles embed.FS
@@ -65,6 +76,7 @@ func main() {
flag.Parse()
mux := http.NewServeMux()
+ mux.HandleFunc("/pong", pong)
jellyfinURL, err := url.Parse("http://localhost:8096")
if err != nil {
log.Fatalf("Jellyfin URL: %s", err)