Start coredns on launch before we serve HTTP -- this checks if port is available

This commit is contained in:
Eugene Bujak 2018-09-06 02:00:57 +03:00
parent 33fbccf0ba
commit 0ce40fd46e

5
app.go
View File

@ -122,6 +122,11 @@ func main() {
http.Handle("/", http.FileServer(box))
registerControlHandlers()
err = startDNSServer()
if err != nil {
log.Fatal(err)
}
URL := fmt.Sprintf("http://%s", address)
log.Println("Go to " + URL)
log.Fatal(http.ListenAndServe(address, nil))