Skip to content

Commit

Permalink
feat: remove http server
Browse files Browse the repository at this point in the history
  • Loading branch information
scmmishra committed Sep 7, 2024
1 parent 3689de7 commit e5f80a6
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const (
initialRetryDelay = 5 * time.Second
maxRetryDelay = 5 * time.Minute
cacheTTL = 3600 // 1 hour in seconds
httpPort = 8080
)

var (
Expand All @@ -45,7 +44,6 @@ func main() {

// Start the periodic update goroutine
go periodicUpdate()
go startHTTPServer()

dns.HandleFunc(".", handleRequest)

Expand All @@ -57,16 +55,6 @@ func main() {
}
}

func startHTTPServer() {
http.Handle("/", http.FileServer(http.Dir("docs")))

log.Printf("Starting HTTP server on port %d", httpPort)
err := http.ListenAndServe(fmt.Sprintf(":%d", httpPort), nil)
if err != nil {
log.Fatalf("Failed to start HTTP server: %s\n", err.Error())
}
}

func periodicUpdate() {
retryDelay := initialRetryDelay
for {
Expand Down

0 comments on commit e5f80a6

Please sign in to comment.