Add flag to change listen address
This commit is contained in:
parent
bb057872a7
commit
957d108e67
3
main.go
3
main.go
|
@ -31,6 +31,7 @@ import (
|
||||||
|
|
||||||
var (
|
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() {
|
func main() {
|
||||||
|
@ -90,7 +91,7 @@ func main() {
|
||||||
|
|
||||||
NewAPI(router.WithPrefix("/api"), alerts, silences)
|
NewAPI(router.WithPrefix("/api"), alerts, silences)
|
||||||
|
|
||||||
go http.ListenAndServe(":9091", router)
|
go http.ListenAndServe(*listenAddress, router)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
hup = make(chan os.Signal)
|
hup = make(chan os.Signal)
|
||||||
|
|
Loading…
Reference in New Issue