module Lib ( main ) where import qualified Core.Configuration as Configuration import qualified Core.HTTP as HTTP import qualified Core.Couch as DB import Core.Types import Control.Monad.Reader (liftIO, runReaderT) import GHC.Natural (popCountNatural) import Prelude hiding (id) import Web.Scotty.Trans (scottyT) main :: IO () main = do dhallConf <- liftIO Configuration.main scottyT (applicationPort dhallConf) (flip runApp dhallConf) HTTP.app where runApp :: ConfigM a -> DhallConfig -> IO a runApp m = runReaderT (runConfigM m)