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 =
do s <- static "static"
c <- newChan
(port,app) <- getApplicationDev True
(settings,app) <- getApplicationDev
ref <- newIORef app
tid <- forkIO
(runSettings
(setPort port defaultSettings)
settings
(\req cont ->
do handler <- readIORef ref
handler req cont))
@ -47,6 +47,6 @@ update =
c <- readStore (Store 2)
writeChan c ()
s <- static "static"
(port,app) <- getApplicationDev True
(_settings,app) <- getApplicationDev
writeIORef ref app
return store