Feature tests pass, unit test does not

This commit is contained in:
Joe Nelson
2014-08-23 18:08:20 -07:00
parent a3a6108d49
commit 036ffa107b
6 changed files with 27 additions and 30 deletions
+5 -2
View File
@@ -5,6 +5,7 @@
module Main where
import Dbapi
import Network.Wai.Handler.Warp hiding (Connection)
import Database.HDBC.PostgreSQL (connectPostgreSQL')
import Control.Applicative
import Options.Applicative hiding (columns)
@@ -21,10 +22,12 @@ argParser = AppConfig
main :: IO ()
main = do
conf <- execParser (info (helper <*> argParser) describe)
let port = configPort conf
let dburi = configDbUri conf
Prelude.putStrLn $ "Listening on port " ++ (show $ configPort conf :: String)
run (configPort conf) $ app conf
conn <- connectPostgreSQL' dburi
run port $ app conn
where
describe = progDesc "create a REST API to an existing Postgres database"