blob: 9f98607b68e698e20cd650e30715484cb6508542 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)
}
|