From 435c65fff51a8b8c0e3378c8edfbed996da9d77c Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 1 Jun 2016 19:25:57 +0300 Subject: [PATCH] Fix DevelMain --- DevelMain.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DevelMain.hs b/DevelMain.hs index 9da3980..ee71409 100644 --- a/DevelMain.hs +++ b/DevelMain.hs @@ -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