web: avoid a fromJust error when running with yesod devel (not working yet)
This commit is contained in:
parent
7742bd2104
commit
9ffd34687a
@ -6,12 +6,18 @@ import Control.Concurrent (forkIO)
|
|||||||
import System.Directory (doesFileExist, removeFile)
|
import System.Directory (doesFileExist, removeFile)
|
||||||
import System.Exit (exitSuccess)
|
import System.Exit (exitSuccess)
|
||||||
import Control.Concurrent (threadDelay)
|
import Control.Concurrent (threadDelay)
|
||||||
|
import System.IO.Storage (withStore, putValue)
|
||||||
|
|
||||||
|
import Hledger (readJournalFile)
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = do
|
main = do
|
||||||
putStrLn "Starting devel application"
|
putStrLn "Starting devel application"
|
||||||
(port, app) <- getApplicationDev
|
(port, app) <- getApplicationDev
|
||||||
forkIO $ runSettings defaultSettings
|
forkIO $
|
||||||
|
withStore "hledger" $ do
|
||||||
|
readJournalFile Nothing Nothing "dev.journal" >>= putValue "hledger" "journal"
|
||||||
|
runSettings defaultSettings
|
||||||
{ settingsPort = port
|
{ settingsPort = port
|
||||||
} app
|
} app
|
||||||
loop
|
loop
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user