. ,-. ,-. . . ,-. ,-. ,-. ,-. ,-. ,-,-. ,-,-. . . ,-. . |- . .
/| `-'
A Go server implementation for the Gemini protocol.
git clone https://source.community/ckaznocha/gemini.git
=> โค๏ธ Likes (1)
=> ๐ Branches
=> ๐ Log
=> ๐ณ File Tree
=> โ /
=> View raw contents of /example_test.go (main)
โโโโโฎ 1โ package gemini_test 2โ 3โ import ( 4โ "context" 5โ "fmt" 6โ "log" 7โ 8โ "source.community/ckaznocha/gemini" 9โ ) 10โ 11โ func ExampleServer_ListenAndServeTLS() { 12โ s := &gemini.Server{ 13โ Handler: gemini.HandlerFunc(func(ctx context.Context, w gemini.ResponseWriter, r *gemini.Request) { 14โ fmt.Fprintln(w.Success(ctx, ""), "Hello, TLS!") 15โ }), 16โ } 17โ 18โ // One can use generate_cert.go in crypto/tls to generate cert.pem and key.pem. 19โ log.Printf("About to listen the default port. Go to gemini://127.0.0.1/") 20โ 21โ err := s.ListenAndServeTLS("", "cert.pem", "key.pem") 22โ log.Fatal(err) 23โ } โโโโโฏ
ยท ยท ยท
=> ๐ก Home | ๐ FAQs | ๐ต๏ธ Privacy Policy | ๐ค Terms & Conditions | ๐ Official Gemlog | info@source.community
ยฉ 2025 source.community
text/gemini; charset=utf-8; lang=en
This content has been proxied by September (3851b).