2019-10-15 22:52:03 +03:00
|
|
|
{-# LANGUAGE RecordWildCards #-}
|
2019-10-15 19:47:54 +03:00
|
|
|
module Main where
|
|
|
|
|
2019-10-15 22:52:03 +03:00
|
|
|
import Control.Monad.App
|
|
|
|
import Data.Config
|
|
|
|
import Network.HTTP.Client.TLS (newTlsManager)
|
|
|
|
import Servant.Client
|
|
|
|
import Server
|
|
|
|
import qualified Data.Text.IO as T
|
|
|
|
import Data.Language
|
|
|
|
|
2019-10-15 19:47:54 +03:00
|
|
|
main :: IO ()
|
2019-10-15 22:52:03 +03:00
|
|
|
main = do
|
|
|
|
_config <- readConfigFromFile "config.yaml"
|
|
|
|
manager <- newTlsManager
|
|
|
|
_languageModel <- buildModel <$> T.readFile (_training _config)
|
|
|
|
let state = App{..}
|
|
|
|
_solidabisClient = ClientEnv manager (_solidabisBase _config) Nothing
|
|
|
|
runAppM state server
|