.
,-. ,-. . . ,-. ,-. ,-.    ,-. ,-. ,-,-. ,-,-. . . ,-. . |- . .
                                                             /|
                                                            `-'

=> Profile for ckaznocha

ckaznocha / gemini

A Go server implementation for the Gemini protocol.

git clone https://source.community/ckaznocha/gemini.git

=> โค๏ธ Likes (1)
=> ๐Ÿ™ Branches
=> ๐Ÿ“ Log
=> ๐ŸŒณ File Tree

/example_test.go (main)

=> โ†‘ /

Blob

=> 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

Proxy Information
Original URL
gemini://source.community/ckaznocha/gemini/blob/main/example_test.go
Status Code
Success (20)
Meta
text/gemini; charset=utf-8; lang=en
Capsule Response Time
549.814678 milliseconds
Gemini-to-HTML Time
0.792526 milliseconds

This content has been proxied by September (3851b).