wip
This commit is contained in:
parent
8f913eca0d
commit
f6576a9134
5 changed files with 237 additions and 36 deletions
24
main.go
24
main.go
|
@ -122,18 +122,18 @@ func parsePageParameter(pageStr string) int {
|
|||
}
|
||||
|
||||
func runServer() {
|
||||
http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static"))))
|
||||
http.HandleFunc("/", handleSearch)
|
||||
http.HandleFunc("/search", handleSearch)
|
||||
http.HandleFunc("/img_proxy", handleImageProxy)
|
||||
http.HandleFunc("/settings", func(w http.ResponseWriter, r *http.Request) {
|
||||
http.ServeFile(w, r, "templates/settings.html")
|
||||
})
|
||||
http.HandleFunc("/opensearch.xml", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "application/opensearchdescription+xml")
|
||||
http.ServeFile(w, r, "static/opensearch.xml")
|
||||
})
|
||||
initializeTorrentSites()
|
||||
// http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static"))))
|
||||
// http.HandleFunc("/", handleSearch)
|
||||
// http.HandleFunc("/search", handleSearch)
|
||||
// http.HandleFunc("/img_proxy", handleImageProxy)
|
||||
// http.HandleFunc("/settings", func(w http.ResponseWriter, r *http.Request) {
|
||||
// http.ServeFile(w, r, "templates/settings.html")
|
||||
// })
|
||||
// http.HandleFunc("/opensearch.xml", func(w http.ResponseWriter, r *http.Request) {
|
||||
// w.Header().Set("Content-Type", "application/opensearchdescription+xml")
|
||||
// http.ServeFile(w, r, "static/opensearch.xml")
|
||||
// })
|
||||
// initializeTorrentSites()
|
||||
|
||||
http.HandleFunc("/node", handleNodeRequest) // Handle node requests
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue