yesod/scaffold/test_hs.cg
2011-04-18 17:28:34 +03:00

21 lines
483 B
Plaintext

{-# LANGUAGE CPP #-}
#if PRODUCTION
import Controller (with~sitearg~)
import Network.Wai.Handler.Warp (run)
main :: IO ()
main = with~sitearg~ $ run 3000
#else
import Controller (with~sitearg~)
import System.IO (hPutStrLn, stderr)
import Network.Wai.Middleware.Debug (debug)
import Network.Wai.Handler.Warp (run)
main :: IO ()
main = do
let port = 3000
hPutStrLn stderr $ "Application launched, listening on port " ++ show port
with~sitearg~ $ run port . debug
#endif