X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=examples%2FHelloWorld.hs;h=20be0ce1a9969dd4dc49fd0bfe5b4984fdb0ae06;hb=40c0d61e88920807a91b8f3c4419b08032988d76;hp=a2c6d50c02795a8959fb1c54c2b5a32d100ff95e;hpb=a44a96d95b5fcbaf24a21c0336046ce0c3bab614;p=Lucu.git diff --git a/examples/HelloWorld.hs b/examples/HelloWorld.hs index a2c6d50..20be0ce 100644 --- a/examples/HelloWorld.hs +++ b/examples/HelloWorld.hs @@ -20,8 +20,15 @@ main :: IO () main = let config = defaultConfig { cnfServerPort = PortNumber 9999 } resources = mkResTree [ ( [] , helloWorld ) - , ( ["compilers"] - , staticFile "/etc/compilers" ) + + , ( ["index.html"] + , staticFile "/Users/admin/Sites/index.html" ) + + , ( ["urandom"] + , staticFile "/dev/urandom" ) + + , ( ["inc"] + , staticDir "/usr/include" ) ] in do installHandler sigPIPE Ignore Nothing @@ -34,8 +41,8 @@ helloWorld resUsesNativeThread = False , resIsGreedy = False , resGet - = Just $ do time <- liftIO $ getClockTime - foundEntity (strongETag "abcde") time + = Just $ do --time <- liftIO $ getClockTime + --foundEntity (strongETag "abcde") time setContentType $ "text" +/+ "hello" outputChunk "Hello, " outputChunk "World!\n"