X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=Lucu.git;a=blobdiff_plain;f=examples%2FHelloWorld.hs;fp=examples%2FHelloWorld.hs;h=2d240e8bb8bb0b751cdaf1d56a76c24b159dd82f;hp=6a732565a78b8c4cba35020df1eda9a8e8fb6d52;hb=251831f3e465eb77666193efcb9b4c02531faa6c;hpb=b7d905bb9034a4f21fa3889e83abff918c43cb58 diff --git a/examples/HelloWorld.hs b/examples/HelloWorld.hs index 6a73256..2d240e8 100644 --- a/examples/HelloWorld.hs +++ b/examples/HelloWorld.hs @@ -8,6 +8,7 @@ import Control.Monad.Unicode import qualified Data.ByteString.Lazy.Char8 as Lazy import qualified Data.Collections as C import Data.Monoid.Unicode +import Network import Network.HTTP.Lucu import Prelude.Unicode @@ -27,7 +28,7 @@ main = let config = defaultConfig { cnfServerPort = "9999" } | otherwise = Nothing in do putStrLn "Access http://localhost:9999/ with your browser." - runHttpd config mapper + withSocketsDo $ runHttpd config mapper helloWorld ∷ Resource helloWorld = C.fromList