webyesod: run simpleserver directly to avoid inaccurate startup message
This commit is contained in:
parent
fcd88ed178
commit
ac1dbb07ef
@ -7,6 +7,7 @@ module Hledger.Cli.Commands.WebYesod
|
|||||||
where
|
where
|
||||||
import Control.Concurrent -- (forkIO)
|
import Control.Concurrent -- (forkIO)
|
||||||
import Data.Either
|
import Data.Either
|
||||||
|
import Network.Wai.Handler.SimpleServer (run)
|
||||||
import System.FilePath ((</>))
|
import System.FilePath ((</>))
|
||||||
import System.IO.Storage (withStore, putValue, getValue)
|
import System.IO.Storage (withStore, putValue, getValue)
|
||||||
import Text.Hamlet
|
import Text.Hamlet
|
||||||
@ -58,7 +59,7 @@ server url port opts args j = do
|
|||||||
}
|
}
|
||||||
withStore "hledger" $ do -- IO ()
|
withStore "hledger" $ do -- IO ()
|
||||||
putValue "hledger" "journal" j
|
putValue "hledger" "journal" j
|
||||||
toWaiApp app >>= basicHandler port
|
toWaiApp app >>= run port
|
||||||
|
|
||||||
data HledgerWebApp = HledgerWebApp {
|
data HledgerWebApp = HledgerWebApp {
|
||||||
appOpts::[Opt]
|
appOpts::[Opt]
|
||||||
|
|||||||
@ -120,6 +120,7 @@ executable hledger
|
|||||||
,hamlet >= 0.3.1 && < 0.4
|
,hamlet >= 0.3.1 && < 0.4
|
||||||
,io-storage >= 0.3 && < 0.4
|
,io-storage >= 0.3 && < 0.4
|
||||||
,wai >= 0.1 && < 0.2
|
,wai >= 0.1 && < 0.2
|
||||||
|
,wai-extra >= 0.1 && < 0.2
|
||||||
,yesod >= 0.3.1 && < 0.4
|
,yesod >= 0.3.1 && < 0.4
|
||||||
|
|
||||||
if flag(chart)
|
if flag(chart)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user