summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-05-01 21:43:44 -0600
committertjpcc <tjp@ctrl-c.club>2023-05-01 21:43:44 -0600
commitfbdcdb469812a1ee7fe40787b0353037aa9fa6ec (patch)
tree154dd0066efefc8f759cf4a912ecde706646001b
parente4db6e1b99018bbcf70051adc15963751cb94215 (diff)
exercise router code in an example
-rw-r--r--examples/fileserver/main.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/fileserver/main.go b/examples/fileserver/main.go
index d38a450..df5e81d 100644
--- a/examples/fileserver/main.go
+++ b/examples/fileserver/main.go
@@ -33,6 +33,10 @@ func main() {
fs.GeminiFileHandler(fileSystem),
)
+ router := &sr.Router{}
+ router.Route("/*", handler)
+ handler = sr.HandlerFunc(router.Handler)
+
_, infoLog, _, errLog := logging.DefaultLoggers()
// add request logging to stdout