]> gitweb @ CieloNegro.org - Lucu.git/blob - examples/ImplantedSmall.hs
fe45b89615dcfbeafd9284f965577df76dc51749
[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 Prelude.Unicode
8 import SmallFile
9
10 main ∷ IO ()
11 main = let config = defaultConfig { cnfServerPort = "9999" }
12            tree   ∷ ResourceTree
13            tree   = C.fromList [ ([], nonGreedy smallFile) ]
14        in
15          do putStrLn "Access http://localhost:9999/ with your browser."
16             withSocketsDo ∘ runHttpd config $ resourceMap tree