]> gitweb @ CieloNegro.org - Lucu.git/blob - examples/ImplantedSmall.hs
ba9b5b9d4cfd336c518e6471924bfe574465ed76
[Lucu.git] / examples / ImplantedSmall.hs
1 {-# LANGUAGE
2     UnicodeSyntax
3   #-}
4 import qualified Data.Collections as C
5 import Network
6 import Network.HTTP.Lucu
7 import SmallFile
8
9 main ∷ IO ()
10 main = let config = defaultConfig { cnfServerPort = "9999" }
11            tree   ∷ ResourceTree
12            tree   = C.fromList [ ([], nonGreedy smallFile) ]
13        in
14          do putStrLn "Access http://localhost:9999/ with your browser."
15             withSocketsDo $ runHttpd config $ resourceMap tree