aboutsummaryrefslogtreecommitdiff
path: root/server/default-conf
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-01-20 19:57:15 +0000
committerGregor Kleen <gkleen@yggdrasil.li>2016-01-20 19:57:15 +0000
commitd27690786ed2056d64c882ac72825755110d4870 (patch)
tree513f2fda510e38e1a1c9bd90dd43bdba7f83bfea /server/default-conf
parent47e346cdea8fdb158cd2942c614609c041936c9e (diff)
downloadthermoprint-d27690786ed2056d64c882ac72825755110d4870.tar
thermoprint-d27690786ed2056d64c882ac72825755110d4870.tar.gz
thermoprint-d27690786ed2056d64c882ac72825755110d4870.tar.bz2
thermoprint-d27690786ed2056d64c882ac72825755110d4870.tar.xz
thermoprint-d27690786ed2056d64c882ac72825755110d4870.zip
Nonfunctional API framework for server
Diffstat (limited to 'server/default-conf')
-rw-r--r--server/default-conf/Main.hs17
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
3module Main (main) where
4
5import Thermoprint.Server
6
7import Control.Monad.Trans.Resource
8import Control.Monad.Logger
9import Control.Monad.Reader
10
11import Database.Persist.Sqlite
12
13main :: IO ()
14main = thermoprintServer (Nat runSqlite) def
15 where
16 runSqlite :: ReaderT ConnectionPool (LoggingT (ResourceT IO)) a -> IO a
17 runSqlite = runResourceT . runStderrLoggingT . withSqlitePool ":memory:" 1 . runReaderT