summaryrefslogtreecommitdiff
path: root/examples/fileserver
diff options
context:
space:
mode:
Diffstat (limited to 'examples/fileserver')
-rw-r--r--examples/fileserver/main.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/fileserver/main.go b/examples/fileserver/main.go
index e70974f..be427a1 100644
--- a/examples/fileserver/main.go
+++ b/examples/fileserver/main.go
@@ -26,11 +26,11 @@ func main() {
// Fallthrough tries each handler in succession until it gets something other than "51 Not Found"
handler := gus.FallthroughHandler(
// first see if they're fetching a directory and we have <dir>/index.gmi
- fs.DirectoryDefault(fileSystem, "index.gmi"),
+ fs.GeminiDirectoryDefault(fileSystem, "index.gmi"),
// next (still if they requested a directory) build a directory listing response
- fs.DirectoryListing(fileSystem, nil),
+ fs.GeminiDirectoryListing(fileSystem, nil),
// finally, try to find a file at the request path and respond with that
- fs.FileHandler(fileSystem),
+ fs.GeminiFileHandler(fileSystem),
)
_, infoLog, _, errLog := logging.DefaultLoggers()
@@ -39,7 +39,7 @@ func main() {
handler = logging.LogRequests(infoLog)(handler)
// run the server
- server, err := gemini.NewServer(context.Background(), errLog, tlsconf, "tcp4", ":1965", handler)
+ server, err := gemini.NewServer(context.Background(), "localhost", "tcp4", ":1965", handler, errLog, tlsconf)
if err != nil {
log.Fatal(err)
}