Fix DevelMain

This commit is contained in:
Michael Snoyman 2016-06-01 19:25:57 +03:00
parent e0f8755f95
commit 435c65fff5

View File

@ -23,11 +23,11 @@ main :: IO (Store (IORef Application))
main = main =
do s <- static "static" do s <- static "static"
c <- newChan c <- newChan
(port,app) <- getApplicationDev True (settings,app) <- getApplicationDev
ref <- newIORef app ref <- newIORef app
tid <- forkIO tid <- forkIO
(runSettings (runSettings
(setPort port defaultSettings) settings
(\req cont -> (\req cont ->
do handler <- readIORef ref do handler <- readIORef ref
handler req cont)) handler req cont))
@ -47,6 +47,6 @@ update =
c <- readStore (Store 2) c <- readStore (Store 2)
writeChan c () writeChan c ()
s <- static "static" s <- static "static"
(port,app) <- getApplicationDev True (_settings,app) <- getApplicationDev
writeIORef ref app writeIORef ref app
return store return store