blob: 0aa7d91158391fb30cc7cba116136f3b6e0f7de2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Thermoprint.Server
import Control.Monad.Trans.Resource
import Control.Monad.Logger
import Control.Monad.Reader
import Database.Persist.Sqlite
main :: IO ()
main = thermoprintServer (Nat runSqlite) def
where
runSqlite :: ReaderT ConnectionPool (LoggingT (ResourceT IO)) a -> IO a
runSqlite = runResourceT . runStderrLoggingT . withSqlitePool ":memory:" 1 . runReaderT
|