X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=examples%2FImplantedSmall.hs;h=2f8f066d8e2a8681385ba95e63e85de58caa17b7;hb=a122079f1e16c8da8e207a30e37f88362286508f;hp=af35b6320979db7d247649b90e3041e66ee1e4bb;hpb=0214f070b80791323430e21b53bcbe8a77b71b23;p=Lucu.git diff --git a/examples/ImplantedSmall.hs b/examples/ImplantedSmall.hs index af35b63..2f8f066 100644 --- a/examples/ImplantedSmall.hs +++ b/examples/ImplantedSmall.hs @@ -1,10 +1,17 @@ +{-# LANGUAGE + UnicodeSyntax + #-} +import qualified Data.Collections as C +import Data.Default +import Network import Network.HTTP.Lucu +import Prelude.Unicode import SmallFile -main :: IO () -main = let config = defaultConfig { cnfServerPort = "9999" } - resources = mkResTree [ ([], smallFile) ] +main ∷ IO () +main = let config = def { 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