1
0
Fork 0
mirror of https://github.com/alice-lg/birdwatcher.git synced 2025-03-09 00:00:05 +01:00

get listen address from config

This commit is contained in:
Matthias Hannig 2016-11-30 13:21:40 +01:00
parent eeb3b8734b
commit d826108fc8

View file

@ -4,7 +4,6 @@ import (
"flag"
"log"
"net/http"
"strings"
"github.com/ecix/birdwatcher/bird"
"github.com/ecix/birdwatcher/endpoints"
@ -63,8 +62,7 @@ func main() {
// Configure client
bird.BirdCmd = birdConf.BirdCmd
// Make server
r := makeRouter()
realPort := strings.Join([]string{":", "23022"}, "")
log.Fatal(http.ListenAndServe(realPort, r))
log.Fatal(http.ListenAndServe(birdConf.Listen, r))
}