wrapped everything in the EnvM Monad, the logging might commence
This commit is contained in:
parent
27a51c2121
commit
ac303abcc0
7 changed files with 78 additions and 51 deletions
|
@ -8,9 +8,13 @@ import Network.Wai.Handler.WebSockets
|
|||
import Network.Wai
|
||||
import Network.HTTP.Types
|
||||
import Control.Concurrent.MVar
|
||||
import Control.Monad.Reader.Class
|
||||
import Environment
|
||||
|
||||
waiApplication :: MVar WSA.ServerState -> Application
|
||||
waiApplication serverState = websocketsOr WS.defaultConnectionOptions (WSA.application serverState) clientServer
|
||||
waiApplication :: MVar WSA.ServerState -> EnvM Application
|
||||
waiApplication serverState = do
|
||||
app <- WSA.application serverState
|
||||
return $ websocketsOr WS.defaultConnectionOptions app clientServer
|
||||
|
||||
-- this should serve the webclient see Network.Wai.responseFile
|
||||
clientServer :: Application
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue