diff options
Diffstat (limited to 'server/default-conf')
-rw-r--r-- | server/default-conf/Main.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/server/default-conf/Main.hs b/server/default-conf/Main.hs new file mode 100644 index 0000000..0aa7d91 --- /dev/null +++ b/server/default-conf/Main.hs | |||
@@ -0,0 +1,17 @@ | |||
1 | {-# LANGUAGE OverloadedStrings #-} | ||
2 | |||
3 | module Main (main) where | ||
4 | |||
5 | import Thermoprint.Server | ||
6 | |||
7 | import Control.Monad.Trans.Resource | ||
8 | import Control.Monad.Logger | ||
9 | import Control.Monad.Reader | ||
10 | |||
11 | import Database.Persist.Sqlite | ||
12 | |||
13 | main :: IO () | ||
14 | main = thermoprintServer (Nat runSqlite) def | ||
15 | where | ||
16 | runSqlite :: ReaderT ConnectionPool (LoggingT (ResourceT IO)) a -> IO a | ||
17 | runSqlite = runResourceT . runStderrLoggingT . withSqlitePool ":memory:" 1 . runReaderT | ||