diff options
author | Joris | 2016-03-20 22:38:44 +0100 |
---|---|---|
committer | Joris | 2016-03-21 20:43:55 +0100 |
commit | 1c7d6ea6e3bcd3c672cb5eb3cf22ffc88cabb257 (patch) | |
tree | 4ff8aeb6aa0f159548f8f506374276c1a2c97f7d /src/server/Main.hs | |
parent | 47104f0b3965cd1dfba0f466afdb5e8983dc7bec (diff) |
use config-manager instead of ConfigFile
Diffstat (limited to 'src/server/Main.hs')
-rw-r--r-- | src/server/Main.hs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/server/Main.hs b/src/server/Main.hs index 3ce6e64..998b394 100644 --- a/src/server/Main.hs +++ b/src/server/Main.hs @@ -20,33 +20,33 @@ import Controller.Payer import Model.Database (runMigrations) import Model.Frequency -import qualified Config +import qualified Conf main :: IO () main = do runMigrations _ <- forkIO monthlyPaymentJobListener - eitherConfig <- Config.getConfig "config.txt" - case eitherConfig of + confOrError <- Conf.getConf "application.conf" + case confOrError of Left errorMessage -> T.putStrLn errorMessage - Right config -> do - scotty (Config.port config) $ do + Right conf -> do + scotty (Conf.port conf) $ do middleware $ staticPolicy (noDots >-> addBase "public") - get "/" (getIndex config) + get "/" (getIndex conf) post "/signOut" signOut -- SignIn post "/signIn" $ do email <- param "email" :: ActionM Text - signIn config email + signIn conf email get "/validateSignIn" $ do token <- param "token" :: ActionM Text - validateSignIn config token + validateSignIn conf token -- Users |