X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=examples%2FHelloWorld.hs;h=00cb33775825fb218c85cb6fcb17e8bf54f9aba6;hb=73b5fba4907604681d778d3bd54cd65fd84b4454;hp=ad1263b530f133bde94f061b07e578fc212739a8;hpb=11c3854540c46bfcd9e88c2164ed554f3b6550a5;p=Lucu.git diff --git a/examples/HelloWorld.hs b/examples/HelloWorld.hs index ad1263b..00cb337 100644 --- a/examples/HelloWorld.hs +++ b/examples/HelloWorld.hs @@ -12,8 +12,13 @@ main = let config = defaultConfig { cnfServerPort = PortNumber 9999 } , ( ["inc"] , staticDir "/usr/include" ) ] + fallbacks = [ \ path -> case path of + ["hello"] -> return $ Just helloWorld + _ -> return Nothing + ] in - runHttpd config resources + do putStrLn "Access http://localhost:9999/ with your browser." + runHttpd config resources fallbacks helloWorld :: ResourceDef