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:
parent
eeb3b8734b
commit
d826108fc8
1 changed files with 2 additions and 4 deletions
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue