Commit 6605c92a authored by Kevin Lyda's avatar Kevin Lyda 💬
Browse files

More tweaks on web server.

parent d072b3dd
Pipeline #1219 passed with stage
in 1 minute
......@@ -8,15 +8,23 @@
package main
import (
var addr = flag.String("listen-address", ":8080", "Address for HTTP requests.")
func metricsHandler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Some metrics.")
func main() {
http.HandleFunc("/", metricsHandler)
http.ListenAndServe(":8080", nil)
http.Handle("/metrics", promhttp.Handler())
log.Fatal(http.ListenAndServe(*addr, nil))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment