main :: IO ()
main = do
  cwd <- getCurrentDirectory
  putStrLn $ "working in " ++ cwd
  connstr <- T.encodeUtf8 . T.pack <$> getEnv "BOOKS_PSQL"
  key <- T.encodeUtf8 . T.pack <$> getEnv "BOOKS_STRIPE_KEY_SECRET"
  config <- newConfig connstr key defaultPayment service
  efrom <- addr . T.pack <$> getEnv "BOOKS_EMAIL_FROM"
  eto <- map (addr . T.pack) . read <$> getEnv "BOOKS_EMAIL_TO"
  let emailConfig = EmailConfig { emailFrom = efrom, emailTo = eto }
  run 8084 (logStdoutDev (app emailConfig config))
main :: IO ()
main = do
  cwd <- getCurrentDirectory
  putStrLn $ "working in " ++ cwd
  connstr <- T.encodeUtf8 . T.pack <$> getEnv "BOOKS_PSQL"
  key <- T.encodeUtf8 . T.pack <$> getEnv "BOOKS_STRIPE_KEY_SECRET"
  config <- newConfig connstr key defaultPayment service
  efrom <- addr . T.pack <$> getEnv "BOOKS_EMAIL_FROM"
  eto <- map (addr . T.pack) . read <$> getEnv "BOOKS_EMAIL_TO"
  let emailConfig = EmailConfig { emailFrom = efrom, emailTo = eto }
  run 8084 (logStdoutDev (app emailConfig config))
main = do
  cwd <- getCurrentDirectory
  putStrLn $ "working in " ++ cwd
  connstr <- T.encodeUtf8 . T.pack <$> getEnv "BOOKS_PSQL"
  key <- T.encodeUtf8 . T.pack <$> getEnv "BOOKS_STRIPE_KEY_SECRET"
  config <- newConfig connstr key defaultPayment service
  efrom <- addr . T.pack <$> getEnv "BOOKS_EMAIL_FROM"
  eto <- map (addr . T.pack) . read <$> getEnv "BOOKS_EMAIL_TO"
  let emailConfig = EmailConfig { emailFrom = efrom, emailTo = eto }
  run 8084 (logStdoutDev (app emailConfig config))