v1 done
This commit is contained in:
parent
f073e69417
commit
0a79763f69
17 changed files with 460 additions and 159 deletions
14
static.go
14
static.go
|
@ -28,6 +28,20 @@ func init() {
|
|||
w.Write(data)
|
||||
}
|
||||
})
|
||||
Router().GET("/surveys", func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||
if data, err := Asset("htdocs/index.html"); err != nil {
|
||||
fmt.Fprintf(w, "{\"errmsg\":%q}", err)
|
||||
} else {
|
||||
w.Write(data)
|
||||
}
|
||||
})
|
||||
Router().GET("/surveys/*_", func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||
if data, err := Asset("htdocs/index.html"); err != nil {
|
||||
fmt.Fprintf(w, "{\"errmsg\":%q}", err)
|
||||
} else {
|
||||
w.Write(data)
|
||||
}
|
||||
})
|
||||
Router().GET("/css/*_", func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||
w.Header().Set("Content-Type", "text/css")
|
||||
if data, err := Asset(path.Join("htdocs", r.URL.Path)); err != nil {
|
||||
|
|
Reference in a new issue