ctdo.de/main.go

24 lines
309 B
Go
Raw Normal View History

package main
import (
"errors"
"fmt"
"net/http"
"os"
)
func main() {
addr := ":80"
handler()
err := http.ListenAndServe(addr, nil)
if errors.Is(err, http.ErrServerClosed) {
fmt.Printf("server closed\n")
} else if err != nil {
fmt.Printf("error starting server: %s\n", err)
os.Exit(1)
}
}