From 957d108e67ea80de3e8ea1479a22c7419fa58afd Mon Sep 17 00:00:00 2001 From: Fabian Reinartz Date: Wed, 30 Sep 2015 17:24:06 +0200 Subject: [PATCH] Add flag to change listen address --- main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 18a5f086..2d788d53 100644 --- a/main.go +++ b/main.go @@ -30,7 +30,8 @@ import ( ) var ( - configFile = flag.String("config.file", "config.yml", "The configuration file") + configFile = flag.String("config.file", "config.yml", "The configuration file") + listenAddress = flag.String("web.listen-address", ":9093", "Address to listen on for the web interface and API.") ) func main() { @@ -90,7 +91,7 @@ func main() { NewAPI(router.WithPrefix("/api"), alerts, silences) - go http.ListenAndServe(":9091", router) + go http.ListenAndServe(*listenAddress, router) var ( hup = make(chan os.Signal)