summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authordemo <demo@antix1>2026-05-07 15:36:18 -0400
committerdemo <demo@antix1>2026-05-07 15:36:18 -0400
commit9c1d8f97aae6454d86c6efdfde03e17cf7ea61ed (patch)
treeee3d078a7a30ed68c63d0cc091a411ec59a48afc /main.go
parent5f3ebd07dc7b416e4ef32a1f45fe6d077e6abe68 (diff)
feat: implement Config to house template needed by Handler
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.go b/main.go
index 10ae4c7..c185441 100644
--- a/main.go
+++ b/main.go
@@ -31,14 +31,14 @@ func main() {
log.Fatal(err)
}
- var story types.Story
- if err := json.Unmarshal(jsonBytes, &story); err != nil {
+ var cfg types.Config
+ if err := json.Unmarshal(jsonBytes, &cfg.Story); err != nil {
log.Fatal(err)
}
// Set up the handlers and server.
mux := http.NewServeMux()
- mux.Handle("/{arc}", &story)
+ mux.Handle("/{arc}", &cfg)
log.Fatal(runServer(mux, *port))
}