The following is an example of an HTTPS server that allows for more configuration, such as setting timeouts. Additionally, this example represents a route handler as a struct that fulfills the Handler interface.
You can download the complete example as a zip file.