Implement basic server executable

This commit is contained in:
Joscha 2020-02-08 18:57:54 +00:00
parent 33f1076b52
commit 42e9f6d462
3 changed files with 55 additions and 12 deletions

View file

@ -1,2 +1,22 @@
module Main where
import qualified Network.WebSockets as WS
import Forest.Server
import Forest.TreeModule.ConstModule
pingDelay :: Int
pingDelay = 10
pongDelay :: Int
pongDelay = 3 * pingDelay
options :: WS.ServerOptions
options = WS.defaultServerOptions
{ WS.serverRequirePong = Just pongDelay
}
main :: IO ()
main = putStrLn "There is only night."
main = do
putStrLn "Starting server"
WS.runServerWithOptions options $ serverApp pingDelay constModule