-- * run app

run :: IO ()
run = do
  con <- PGS.connect PGS.defaultConnectInfo
          { PGS.connectUser     = "ordermage"
          , PGS.connectPassword = "thisisatest"
          , PGS.connectDatabase = "ordermage"
          }
  let port = 3000
      settings =
        setPort port $
        setBeforeMainLoop (hPutStrLn stderr ("listening on port " ++ show port)) defaultSettings
  runSettings settings =<< mkApp con
run :: IO ()
run = do
  con <- PGS.connect PGS.defaultConnectInfo
          { PGS.connectUser     = "ordermage"
          , PGS.connectPassword = "thisisatest"
          , PGS.connectDatabase = "ordermage"
          }
  let port = 3000
      settings =
        setPort port $
        setBeforeMainLoop (hPutStrLn stderr ("listening on port " ++ show port)) defaultSettings
  runSettings settings =<< mkApp con
run = do
  con <- PGS.connect PGS.defaultConnectInfo
          { PGS.connectUser     = "ordermage"
          , PGS.connectPassword = "thisisatest"
          , PGS.connectDatabase = "ordermage"
          }
  let port = 3000
      settings =
        setPort port $
        setBeforeMainLoop (hPutStrLn stderr ("listening on port " ++ show port)) defaultSettings
  runSettings settings =<< mkApp con