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
+5.4k Golang : fmt.Println prints out empty data from struct
+27.7k PHP : Count number of JSON items/objects
+7.4k Golang : Example of custom handler for Gorilla's Path usage.
+5.1k Swift : Convert (cast) Float to Int or Int32 value
+15.9k Golang : Read a file line by line
+9.7k PHP : Get coordinates latitude/longitude from string
+15.4k Golang : Find location by IP address and display with Google Map
+18.9k Golang : Read input from console line
+6.2k Golang : Calculate US Dollar Index (DXY)
+9.8k Golang : Qt get screen resolution and display on center example
+13.4k Golang : Get constant name from value
+5.3k Javascript : Change page title to get viewer attention