From 614ce0309aa9be5f7f65c03dcd64c2f38a71ee89 Mon Sep 17 00:00:00 2001 From: Las Zenow Date: Tue, 31 Jul 2012 00:42:02 +0200 Subject: [PATCH] Download books --- book.html | 2 ++ trantor.go | 1 + 2 files changed, 3 insertions(+) diff --git a/book.html b/book.html index eaffd3b..35aa8eb 100644 --- a/book.html +++ b/book.html @@ -8,3 +8,5 @@
  • Date: {{.Date}}
  • Lang: {{range .Lang}}{{.}} {{end}}
  • + +

    download

    diff --git a/trantor.go b/trantor.go index 318f166..ab99a19 100644 --- a/trantor.go +++ b/trantor.go @@ -58,6 +58,7 @@ func main() { http.HandleFunc("/search/", func(w http.ResponseWriter, r *http.Request) { searchHandler(coll, w, r) }) http.HandleFunc("/img/", sendFile) http.HandleFunc("/cover/", sendFile) + http.HandleFunc("/books/", sendFile) http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { loadTemplate(w, "front", nil) }) http.ListenAndServe(":8080", nil) }