mirror of
https://github.com/gosticks/simplecert.git
synced 2026-08-17 14:40:18 +00:00
27 lines
483 B
Go
27 lines
483 B
Go
//
|
|
// simplecert
|
|
//
|
|
// Created by Philipp Mieden
|
|
// Contact: dreadl0ck@protonmail.ch
|
|
// Copyright © 2018 bestbytes. All rights reserved.
|
|
//
|
|
|
|
package main
|
|
|
|
import (
|
|
"log"
|
|
"net/http"
|
|
|
|
"github.com/foomo/simplecert"
|
|
)
|
|
|
|
func main() {
|
|
|
|
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
|
w.WriteHeader(http.StatusOK)
|
|
w.Write([]byte("hello"))
|
|
})
|
|
|
|
log.Fatal(simplecert.ListenAndServeTLSLocal(":443", nil, "myawesomewebsite.com", "sub.myawesomewebsite.com"))
|
|
}
|