back to flask :-)
This commit is contained in:
parent
4b54b97b16
commit
64f54593ec
10 changed files with 69 additions and 95 deletions
|
|
@ -47,7 +47,7 @@ func commentsCount(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
// relay request to stacosys
|
||||
//fmt.Println("QUERY: " + config.Stacosys + r.URL.String())
|
||||
fmt.Println("QUERY: " + config.Stacosys + r.URL.String())
|
||||
response, err := http.Get(config.Stacosys + r.URL.String())
|
||||
if err != nil {
|
||||
http.NotFound(w, r)
|
||||
|
|
@ -80,6 +80,7 @@ func main() {
|
|||
json.Unmarshal(file, &config)
|
||||
fmt.Printf("config: %s\n", string(file))
|
||||
|
||||
http.HandleFunc("/comments/count/", commentsCount)
|
||||
http.HandleFunc("/comments/count", commentsCount)
|
||||
http.ListenAndServe(config.HostPort, nil)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue