test/app/main.go
Zeev Diukman 68fc296c20 3
2025-01-09 11:24:46 +02:00

25 lines
485 B
Go

package main
import (
"log"
"os"
"os/signal"
"github.com/zeevdiukman/test/app/dns"
"github.com/zeevdiukman/test/app/helper"
)
func main() {
helper.P("STARTING SERVERS")
// Run the HTTP and DNS servers concurrently
go runHTTP()
go func() {
dns := dns.New("./dns.yaml")
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...")
}