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
+19.2k Golang : Execute shell command
+11.6k Android Studio : Create custom icons for your application example
+17.2k Golang : Find file size(disk usage) with filepath.Walk
+5.9k Golang : Generate multiplication table from an integer example
+7.8k Golang : Getting Echo framework StartAutoTLS to work
+12.2k Golang : Split strings into command line arguments
+4.7k JavaScript: Add marker function on Google Map
+18.1k Golang : Check if a directory exist or not
+8.1k Golang : Tell color name with OpenCV example
+9.3k Golang : Generate random Chinese, Japanese, Korean and other runes
+32.1k Golang : Validate email address with regular expression