aboutsummaryrefslogtreecommitdiff
path: root/server/src/Thermoprint/Server.hs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/Thermoprint/Server.hs')
-rw-r--r--server/src/Thermoprint/Server.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/src/Thermoprint/Server.hs b/server/src/Thermoprint/Server.hs
index 419679c..0d96de0 100644
--- a/server/src/Thermoprint/Server.hs
+++ b/server/src/Thermoprint/Server.hs
@@ -41,7 +41,7 @@ import Thermoprint.Server.Database
41import qualified Thermoprint.Server.API as API (thermoprintServer) 41import qualified Thermoprint.Server.API as API (thermoprintServer)
42import Thermoprint.Server.API hiding (thermoprintServer) 42import Thermoprint.Server.API hiding (thermoprintServer)
43 43
44 44-- | Compile-time configuration for 'thermoprintServer'
45data Config = Config { dyreError :: Maybe String -- ^ Set by 'Dyre' -- sent to log as an error 45data Config = Config { dyreError :: Maybe String -- ^ Set by 'Dyre' -- sent to log as an error
46 , warpSettings :: Warp.Settings -- ^ Configure 'Warp's behaviour 46 , warpSettings :: Warp.Settings -- ^ Configure 'Warp's behaviour
47 } 47 }
@@ -56,7 +56,8 @@ thermoprintServer :: ( MonadLoggerIO m
56 , MonadIO m 56 , MonadIO m
57 , MonadBaseControl IO m 57 , MonadBaseControl IO m
58 , MonadReader ConnectionPool m 58 , MonadReader ConnectionPool m
59 ) => (m :~> IO) -> Config -> IO () 59 ) => (m :~> IO) -- ^ 'dyre' controls the base of the monad-transformer-stack ('IO') but we let the user specify the rest of it. Therefore we require a specification of how to enter the stack.
60 -> Config -> IO ()
60-- ^ Run the server 61-- ^ Run the server
61thermoprintServer io = Dyre.wrapMain $ Dyre.defaultParams 62thermoprintServer io = Dyre.wrapMain $ Dyre.defaultParams
62 { Dyre.projectName = "thermoprint-server" 63 { Dyre.projectName = "thermoprint-server"