]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - examples/HelloWorld.hs
Network.HTTP.Lucu
[Lucu.git] / examples / HelloWorld.hs
index a2c6d50c02795a8959fb1c54c2b5a32d100ff95e..20be0ce1a9969dd4dc49fd0bfe5b4984fdb0ae06 100644 (file)
@@ -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"