X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=examples%2FImplantedSmall.hs;h=ba9b5b9d4cfd336c518e6471924bfe574465ed76;hb=251831f3e465eb77666193efcb9b4c02531faa6c;hp=a985cae482d20037d125cda916bd3dbef756f33b;hpb=3eb69879d3b336c7c3e613c0ce4bfb3c67989ff3;p=Lucu.git diff --git a/examples/ImplantedSmall.hs b/examples/ImplantedSmall.hs index a985cae..ba9b5b9 100644 --- a/examples/ImplantedSmall.hs +++ b/examples/ImplantedSmall.hs @@ -1,13 +1,15 @@ {-# LANGUAGE UnicodeSyntax #-} +import qualified Data.Collections as C +import Network import Network.HTTP.Lucu import SmallFile main ∷ IO () -main = let config = defaultConfig { cnfServerPort = "9999" } - resources = mkResTree [ ([], smallFile) ] +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 + withSocketsDo $ runHttpd config $ resourceMap tree