]> gitweb @ CieloNegro.org - Rakka.git/blob - Rakka/Environment.hs
In early development
[Rakka.git] / Rakka / Environment.hs
1 module Rakka.Environment
2     ( Environment(..)
3     , setupEnv
4     )
5     where
6
7 import           Network
8 import qualified Network.HTTP.Lucu.Config as LC
9
10
11 data Environment = Environment {
12       envLocalStateDir :: FilePath
13     , envLucuConf      :: LC.Config
14     }
15
16
17 setupEnv :: FilePath -> PortNumber -> IO Environment
18 setupEnv lsdir portNum
19     = do let lucuConf = LC.defaultConfig {
20                           LC.cnfServerPort = PortNumber portNum
21                         }
22          return $ Environment {
23                       envLocalStateDir = lsdir
24                     , envLucuConf      = lucuConf
25                     }