Golang net/http.Server.ListenAndServeTLS() function example
package net/http
Golang net/http.Server.ListenAndServeTLS() function usage example
Code modified from https://www.socketloop.com/references/golang-net-http-server-listenandserve-function-and-server-type-example
TLSServer := &http.Server{Handler: mux}
TLSServer.Addr = "hostname:443"
err := TLSServer.ListenAndServeTLS("server.pem", "server.key")
See also : https://www.socketloop.com/references/golang-crypto-tls-listen-and-newlistener-functions-example
References :
See also : Golang net/http.Server.ListenAndServe() function and Server type example
Advertisement
Something interesting
Tutorials
+20.2k Golang : Convert seconds to human readable time format example
+5.6k Fix fatal error: evacuation not done in time problem
+8.6k Python : Fix SyntaxError: Non-ASCII character in file, but no encoding declared
+16k Golang : How to reverse elements order in map ?
+12.3k Golang : Get month name from date example
+6.3k WARNING: UNPROTECTED PRIVATE KEY FILE! error message
+19.5k Golang : Example for DSA(Digital Signature Algorithm) package functions
+8.2k Golang : Find relative luminance or color brightness
+9.7k Golang : Load ASN1 encoded DSA public key PEM file example
+20.2k Golang : How to get struct tag and use field name to retrieve data?
+9.2k Golang : How to control fmt or log print format?
+5.7k Get website traffic ranking with Similar Web or Alexa