http.ListenAndServer

ListenAndServe starts an HTTP server. with a given address and handler. The handler is usually nil, which means to use DefaultServeMux. Handle and HandleFunc add handlers to DefaultServeMux: log.Fatal(http.ListenAndServe(“:8080”, nil)) func ListenAndServe func ListenAndServe(addr string, handler Handler) error ListenAndServe listens on the TCP network address addr and then calls Serve with Read more…