diff options
Diffstat (limited to 'src/hub/src/spreadspace.org')
-rw-r--r-- | src/hub/src/spreadspace.org/sfive-hub/s5hub.go | 6 | ||||
-rw-r--r-- | src/hub/src/spreadspace.org/sfive/s5srvWeb.go | 18 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/hub/src/spreadspace.org/sfive-hub/s5hub.go b/src/hub/src/spreadspace.org/sfive-hub/s5hub.go index c1802eb..bb5e80f 100644 --- a/src/hub/src/spreadspace.org/sfive-hub/s5hub.go +++ b/src/hub/src/spreadspace.org/sfive-hub/s5hub.go @@ -23,5 +23,11 @@ func main() { server.ServePipe("/run/sfive/pipe") }() + wg.Add(1) + go func() { + defer wg.Done() + server.ServeWeb() + }() + wg.Wait() } diff --git a/src/hub/src/spreadspace.org/sfive/s5srvWeb.go b/src/hub/src/spreadspace.org/sfive/s5srvWeb.go new file mode 100644 index 0000000..1b64c4b --- /dev/null +++ b/src/hub/src/spreadspace.org/sfive/s5srvWeb.go @@ -0,0 +1,18 @@ +package sfive + +import ( + "fmt" + "net/http" + + "github.com/zenazn/goji" + "github.com/zenazn/goji/web" +) + +func hello(c web.C, w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "Hello, %s!", c.URLParams["name"]) +} + +func (self StatsSinkServer) ServeWeb() { + goji.Get("/hello/:name", hello) + goji.Serve() +} |