package main import ( "context" "log" "github.com/go-kit/log/level" 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), ) baseLog := logging.Base() handler = logging.LogRequests(level.Info(baseLog))(handler) server, err := gopher.NewServer(context.Background(), "localhost", "tcp4", ":70", handler, baseLog) if err != nil { log.Fatal(err) } server.Serve() }