diff options
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/Main.hs b/src/Main.hs index f38646b..27dcfa5 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -6,16 +6,15 @@ module Main import qualified Data.Text.IO as T -import AdListener (listenToNewAds) +import qualified AdListener -import Config (Config) -import qualified Config as C +import qualified Conf main :: IO () main = do - maybeConfig <- C.getConfig - case maybeConfig of - Just config -> - listenToNewAds config - Nothing -> - T.putStrLn C.configUsage + eitherConfig <- Conf.parse "application.conf" + case eitherConfig of + Right config -> + AdListener.start config + Left message -> + T.putStrLn message |