Download books
This commit is contained in:
parent
679df42dde
commit
614ce0309a
2 changed files with 3 additions and 0 deletions
|
@ -8,3 +8,5 @@
|
|||
<li><strong>Date:</strong> {{.Date}}</li>
|
||||
<li><strong>Lang:</strong> {{range .Lang}}{{.}} {{end}}</li>
|
||||
</ul>
|
||||
|
||||
<p><a href="/{{.Path}}">download</a></p>
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Reference in a new issue