X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=Lucu.git;a=blobdiff_plain;f=examples%2FImplantedSmall.hs;h=fe45b89615dcfbeafd9284f965577df76dc51749;hp=1a652111237fba6fa022ed50af437a3a29a80355;hb=950640dd241222203778f8167943d30fa52f356a;hpb=ea8f823ffa1004582d403c69f52a83e20486269f diff --git a/examples/ImplantedSmall.hs b/examples/ImplantedSmall.hs index 1a65211..fe45b89 100644 --- a/examples/ImplantedSmall.hs +++ b/examples/ImplantedSmall.hs @@ -1,11 +1,16 @@ +{-# LANGUAGE + UnicodeSyntax + #-} +import qualified Data.Collections as C import Network import Network.HTTP.Lucu +import Prelude.Unicode 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 + withSocketsDo ∘ runHttpd config $ resourceMap tree