-main :: IO ()
-main = let config = defaultConfig { cnfServerPort = PortNumber 9999 }
- resources = mkResTree [ ( []
- , helloWorld )
-
- , ( ["urandom"]
- , staticFile "/dev/urandom" )
-
- , ( ["inc"]
- , staticDir "/usr/include" )
- ]
+main ∷ IO ()
+main = let config = defaultConfig { cnfServerPort = "9999" }
+ resources = mkResTree
+ [ ([] , helloWorld )
+ , (["urandom"], staticFile "/dev/urandom")
+ , (["inc" ], staticDir "/usr/include" )
+ ]
+ fallbacks = [ \ path → case path of
+ ["hello"] → return $ Just helloWorld
+ _ → return Nothing
+ ]