X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=Lucu.git;a=blobdiff_plain;f=examples%2FImplantedSmall.hs;h=f7e8856d6b350ab31320e94315e51059a930e2e7;hp=9ee3466e1217c39fb4bbda99fa611137310a5452;hb=9be2b946657c536a4363a076235f70728be087c4;hpb=50e8fe7af585a8d33d93b3721be8f8f01905b891 diff --git a/examples/ImplantedSmall.hs b/examples/ImplantedSmall.hs index 9ee3466..f7e8856 100644 --- a/examples/ImplantedSmall.hs +++ b/examples/ImplantedSmall.hs @@ -1,11 +1,14 @@ -import Network +{-# LANGUAGE + UnicodeSyntax + #-} +import qualified Data.Collections as C import Network.HTTP.Lucu import SmallFile -main :: IO () -main = let config = defaultConfig { cnfServerPort = PortNumber 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