package main import ( "context" "log" sr "tildegit.org/tjp/sliderule" "tildegit.org/tjp/sliderule/contrib/cgi" "tildegit.org/tjp/sliderule/contrib/fs" "tildegit.org/tjp/sliderule/gopher" "tildegit.org/tjp/sliderule/logging" ) func main() { handler := sr.FallthroughHandler( fs.GopherDirectoryDefault(".", "", nil), fs.GopherDirectoryListing(".", "", nil), cgi.GopherCGIDirectory("/cgi-bin", "./cgi-bin", nil), fs.GopherFileHandler(".", "", nil), ) _, infoLog, _, errLog := logging.DefaultLoggers() handler = logging.LogRequests(infoLog)(handler) server, err := gopher.NewServer(context.Background(), "localhost", "tcp4", ":70", handler, errLog) if err != nil { log.Fatal(err) } server.Serve() }