test/app/main.go
Zeev Diukman 75622f8a35 dns fix
2025-01-09 10:39:53 +02:00

24 lines
421 B
Go

package main
import (
"log"
"os"
"os/signal"
"github.com/zeevdiukman/test/app/dns"
)
func main() {
// Run the HTTP and DNS servers concurrently
go runHTTP()
go func() {
dns := dns.NewDNS("config/dns.yml")
dns.Run()
}()
// Wait for SIGINT (Ctrl+C) to gracefully shut down the server
stop := make(chan os.Signal, 1)
signal.Notify(stop, os.Interrupt)
<-stop
log.Println("Shutting down the server...")
}