X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=examples%2FHelloWorld.hs;fp=examples%2FHelloWorld.hs;h=00cb33775825fb218c85cb6fcb17e8bf54f9aba6;hb=50e8fe7af585a8d33d93b3721be8f8f01905b891;hp=f21e052d7c0a8219ae0ee6b91510e081ee4032e4;hpb=e53a2f3202f763e844de725712f1bf26b82cd41f;p=Lucu.git diff --git a/examples/HelloWorld.hs b/examples/HelloWorld.hs index f21e052..00cb337 100644 --- a/examples/HelloWorld.hs +++ b/examples/HelloWorld.hs @@ -12,9 +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 do putStrLn "Access http://localhost:9999/ with your browser." - runHttpd config resources + runHttpd config resources fallbacks helloWorld :: ResourceDef