started logging (but it's a bit ugly)
This commit is contained in:
parent
04d9f063d4
commit
56e546f5dd
6 changed files with 55 additions and 15 deletions
|
@ -10,6 +10,7 @@ module Main where
|
|||
|
||||
import Control.Concurrent.MVar
|
||||
import WaiApp
|
||||
import qualified Colog as Log
|
||||
|
||||
#ifdef HTTP_SUPPORT
|
||||
import qualified Network.Wai.Handler.Warp as HTTP
|
||||
|
@ -28,11 +29,14 @@ import qualified Network.Wai.Handler.FastCGI as FastCGI
|
|||
import qualified Network.Wai.Handler.CGI as CGI
|
||||
#endif
|
||||
|
||||
logAction :: Log.LogAction IO Log.Message
|
||||
logAction = undefined
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
serverState <- newMVar newServerState
|
||||
#ifdef HTTP_SUPPORT
|
||||
HTTP.runSettings HTTP.defaultSettings $ waiApplication serverState
|
||||
HTTP.runSettings HTTP.defaultSettings $ waiApplication logAction serverState
|
||||
#endif
|
||||
#ifdef HTTPS_SUPPORT
|
||||
HTTPS.runTLS HTTPS.defaultTlsSettings HTTP.defaultSettings $ waiApplication serverState
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue