summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/main.go b/main.go
index c185441..f070c9b 100644
--- a/main.go
+++ b/main.go
@@ -3,6 +3,7 @@ package main
import (
"encoding/json"
"flag"
+ "html/template"
"io"
"log"
"net/http"
@@ -36,6 +37,14 @@ func main() {
log.Fatal(err)
}
+ // Set up all the templates needed for the story arcs.
+ indexTmpl, err := template.ParseGlob("views/*.gohtml")
+ if err != nil {
+ log.Fatal(err)
+ }
+
+ cfg.Template = indexTmpl
+
// Set up the handlers and server.
mux := http.NewServeMux()
mux.Handle("/{arc}", &cfg)