X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=examples%2FImplanted.hs;h=03bcbdb1a88593972e17e594ca2b6f6c07bd907b;hb=251831f3e465eb77666193efcb9b4c02531faa6c;hp=633e40ae4f1361cfebf4ee344a760045742ab15e;hpb=7b141208b4c741de208ec147eff6b2462ce26e80;p=Lucu.git diff --git a/examples/Implanted.hs b/examples/Implanted.hs index 633e40a..03bcbdb 100644 --- a/examples/Implanted.hs +++ b/examples/Implanted.hs @@ -1,11 +1,15 @@ +{-# LANGUAGE + UnicodeSyntax + #-} +import qualified Data.Collections as C import MiseRafturai import Network import Network.HTTP.Lucu -main :: IO () -main = let config = defaultConfig { cnfServerPort = PortNumber 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