webyesod: small cleanup

This commit is contained in:
Simon Michael 2010-07-06 20:57:29 +00:00
parent 09b44176ce
commit 505833020f

View File

@ -36,9 +36,12 @@ import Paths_hledger (getDataFileName)
#endif #endif
tcpport = 5000 :: Int hostname = "localhost"
browserdelay = 100000 -- microseconds tcpport = 5000
homeurl = printf "http://localhost:%d" tcpport
browserstartdelay = 100000 -- microseconds
homeurl = printf "http://%s:%d" hostname tcpport
hledgerurl = "http://hledger.org" hledgerurl = "http://hledger.org"
manualurl = hledgerurl++"/MANUAL.html" manualurl = hledgerurl++"/MANUAL.html"
@ -48,7 +51,7 @@ web opts args j = do
server opts args j server opts args j
browser :: IO () browser :: IO ()
browser = putStrLn "starting web browser" >> threadDelay browserdelay >> openBrowserOn homeurl >> return () browser = putStrLn "starting web browser" >> threadDelay browserstartdelay >> openBrowserOn homeurl >> return ()
server :: [Opt] -> [String] -> Journal -> IO () server :: [Opt] -> [String] -> Journal -> IO ()
server opts args j = do server opts args j = do