mirror of
				https://github.com/SourceFellows/gobuch.git
				synced 2025-11-03 23:26:17 +01:00 
			
		
		
		
	initial import
This commit is contained in:
		
							
								
								
									
										3
									
								
								microservices/letscrypt/go.mod
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								microservices/letscrypt/go.mod
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
module golang.source-fellows.com/samples/https/letscrypt
 | 
			
		||||
 | 
			
		||||
go 1.14
 | 
			
		||||
							
								
								
									
										19
									
								
								microservices/letscrypt/main.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								microservices/letscrypt/main.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,19 @@
 | 
			
		||||
package main
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"log"
 | 
			
		||||
	"net/http"
 | 
			
		||||
 | 
			
		||||
	"golang.org/x/crypto/acme/autocert"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func main() {
 | 
			
		||||
 | 
			
		||||
	http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
 | 
			
		||||
		fmt.Fprintln(w, "Hello World")
 | 
			
		||||
	})
 | 
			
		||||
 | 
			
		||||
	log.Fatal(http.Serve(autocert.NewListener("x.source-fellows.com"), nil))
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user