X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=examples%2FImplanted.hs;h=34878a094a3fd1cfc71ac76df1ff62c6b659b1cf;hb=950640dd241222203778f8167943d30fa52f356a;hp=68423086a2472ac51fa1d777ecf9ac412fbe2a97;hpb=0214f070b80791323430e21b53bcbe8a77b71b23;p=Lucu.git diff --git a/examples/Implanted.hs b/examples/Implanted.hs index 6842308..34878a0 100644 --- a/examples/Implanted.hs +++ b/examples/Implanted.hs @@ -1,10 +1,16 @@ +{-# LANGUAGE + UnicodeSyntax + #-} +import qualified Data.Collections as C import MiseRafturai +import Network import Network.HTTP.Lucu +import Prelude.Unicode -main :: IO () -main = let config = defaultConfig { cnfServerPort = "9999" } - resources = mkResTree [ ([], miseRafturai) ] +main ∷ IO () +main = let config = defaultConfig { cnfServerPort = "9999" } + tree ∷ ResourceTree + tree = C.fromList [ ([], nonGreedy miseRafturai) ] in do putStrLn "Access http://localhost:9999/ with your browser." - runHttpd config resources [] - \ No newline at end of file + withSocketsDo ∘ runHttpd config $ resourceMap tree