summaryrefslogtreecommitdiff
path: root/src/hub/src/spreadspace.org/sfive/s5srvWeb.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/hub/src/spreadspace.org/sfive/s5srvWeb.go')
-rw-r--r--src/hub/src/spreadspace.org/sfive/s5srvWeb.go18
1 files changed, 18 insertions, 0 deletions
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()
+}