Original post


For more than a decade, security experts have been advocating SSL certificates for servers.

For production servers you can use a SSL certificate from a reputable organization like Let’s Encrypt.

For Development (or non-public facing Production) servers, you may want to self-sign your certificates.

I’ve created a package to make it super quick and easy.

package main

import (

func main() {// Create a simple http hander
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
// Configure the port
httpServer, _ := Server("8080", GenerateOptions{Host: "thecucumber.app"})
// Start the server
log.Fatal(httpServer.ListenAndServeTLS("", ""))

Just remember to change the url from http to https. Also configure your http client code/application to allow self-signed certificates.

Repository: https://github.com/rocketlaunchr/https-go

Docs: https://github.com/rocketlaunchr/https-go