changed to work with Domain

This commit is contained in:
Falko Victor Habel 2024-03-19 11:38:22 +01:00
parent d60c725194
commit 7623c53e62
1 changed files with 2 additions and 2 deletions

View File

@ -217,7 +217,7 @@ func handleRequest(w http.ResponseWriter, r *http.Request) {
func main() {
// Define the HTTP handler function
http.HandleFunc("/api", handleRequest)
http.HandleFunc("", handleRequest)
// Get the port number from the environment variable or use a default value
port := "53184"
@ -226,7 +226,7 @@ func main() {
}
// Start the HTTP server
fmt.Printf("Listening on :%s...\n", port)
fmt.Printf("Listening :%s...\n", port)
err := http.ListenAndServe(":"+port, nil)
if err != nil {
log.Fatalf("Failed to start server: %v", err)