]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - examples/ImplantedSmall.hs
examples
[Lucu.git] / examples / ImplantedSmall.hs
index af35b6320979db7d247649b90e3041e66ee1e4bb..f7e8856d6b350ab31320e94315e51059a930e2e7 100644 (file)
@@ -1,10 +1,14 @@
+{-# LANGUAGE
+    UnicodeSyntax
+  #-}
+import qualified Data.Collections as C
 import Network.HTTP.Lucu
 import SmallFile
 
-main :: IO ()
-main = let config    = defaultConfig { cnfServerPort = "9999" }
-           resources = mkResTree [ ([], smallFile) ]
+main ∷ IO ()
+main = let config = defaultConfig { cnfServerPort = "9999" }
+           tree   ∷ ResourceTree
+           tree   = C.fromList [ ([], nonGreedy smallFile) ]
        in
          do putStrLn "Access http://localhost:9999/ with your browser."
-            runHttpd config resources []
-                                   
\ No newline at end of file
+            runHttpd config $ resourceMap tree