Skip to content

gavinzhou/hello-localhttps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hello LocalHttps

Install mkcert

On macOS, use Homebrew.

brew install mkcert
brew install nss # if you use Firefox

build from source (requires Go 1.10+)

go get -u github.com/FiloSottile/mkcert
$(go env GOPATH)/bin/mkcert

mkcert is a simple tool for making locally-trusted development certificates. It requires no configuration.

$ mkcert -install
Created a new local CA at "/Users/filippo/Library/Application Support/mkcert" 💥
The local CA is now installed in the system trust store! ⚡️
The local CA is now installed in the Firefox trust store (requires restart)! 🦊

$ mkcert  localhost 127.0.0.1 ::1 dev.test.local
Using the local CA at "/Users/filippo/Library/Application Support/mkcert" ✨

Created a new certificate valid for the following names 📜
 - "localhost"
 - "127.0.0.1"
 - "::1"
 - "dev.test.local"

Test go with https server on localhost

	err := http.ListenAndServeTLS(":4433", "localhost+3.pem", "localhost+3-key.pem", nil)
	if err != nil {
		log.Fatal("ListenAndServe: ", err)
	}
go run https-server.go

Open LocalHttps on chrome

mkcert

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages