diff options
Diffstat (limited to 'host.go')
-rw-r--r-- | host.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/host.go b/host.go new file mode 100644 index 0000000..9f98607 --- /dev/null +++ b/host.go @@ -0,0 +1,17 @@ +package main + +import ( + "net/http" + "io/ioutil" +) + +func main() { + mux := http.NewServeMux() + mux.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) { + content, error := ioutil.ReadFile("/tmp/client.conf") + if error == nil { + w.Write(content) + } + }) + http.ListenAndServe(":9999", mux) +} \ No newline at end of file |