github.com/mutagen-io/mutagen@v0.18.0-rc1/pkg/integration/fixtures/httpdemo/main.go (about) 1 package main 2 3 import ( 4 "io" 5 "log" 6 "net/http" 7 8 "github.com/mutagen-io/mutagen/pkg/integration/fixtures/constants" 9 ) 10 11 func main() { 12 // Create a handler. 13 handler := func(response http.ResponseWriter, request *http.Request) { 14 io.WriteString(response, constants.HTTPDemoResponse) 15 } 16 17 // Register the handler. 18 http.HandleFunc("/", handler) 19 20 // Serve requests. 21 log.Fatal(http.ListenAndServe(constants.HTTPDemoBindAddress, nil)) 22 }