[server] Implement API changes

This commit is contained in:
Joscha 2020-02-17 23:34:02 +00:00
parent 964b13739a
commit d2c6efd6c4
6 changed files with 191 additions and 143 deletions

View file

@ -25,22 +25,22 @@ main :: IO ()
main = do
putStrLn "Starting server"
WS.runServerWithOptions options $ serverApp pingDelay $ forkModule "Forest"
[ ProngConstructor $ constModule $ newNode "" "Test" [txtNode "" "Bla"]
, ProngConstructor $ animateModule 200000
[ newNode "" "Animate" [txtNode "" "|> |", txtNode "" "Ping!"]
, newNode "" "Animate" [txtNode "" "|-> |", txtNode "" "Ping!"]
, newNode "" "Animate" [txtNode "" "| -> |", txtNode "" "Ping!"]
, newNode "" "Animate" [txtNode "" "| -> |", txtNode "" "Ping!"]
, newNode "" "Animate" [txtNode "" "| ->|", txtNode "" "Ping!"]
, newNode "" "Animate" [txtNode "" "| -|", txtNode "" "Ping!"]
, newNode "" "Animate" [txtNode "" "| |", txtNode "" "Ping!"]
, newNode "" "Animate" [txtNode "" "| <|", txtNode "" "Pong!"]
, newNode "" "Animate" [txtNode "" "| <-|", txtNode "" "Pong!"]
, newNode "" "Animate" [txtNode "" "| <- |", txtNode "" "Pong!"]
, newNode "" "Animate" [txtNode "" "| <- |", txtNode "" "Pong!"]
, newNode "" "Animate" [txtNode "" "|<- |", txtNode "" "Pong!"]
, newNode "" "Animate" [txtNode "" "|- |", txtNode "" "Pong!"]
, newNode "" "Animate" [txtNode "" "| |", txtNode "" "Pong!"]
[ ProngConstructor "Test" $ constModule $ newNode "" "" [txtNode "" "Bla"]
, ProngConstructor "Animation" $ animateModule 200000 $ map (newNode "" "")
[ [txtNode "" "|> |", txtNode "" "Ping!"]
, [txtNode "" "|-> |", txtNode "" "Ping!"]
, [txtNode "" "| -> |", txtNode "" "Ping!"]
, [txtNode "" "| -> |", txtNode "" "Ping!"]
, [txtNode "" "| ->|", txtNode "" "Ping!"]
, [txtNode "" "| -|", txtNode "" "Ping!"]
, [txtNode "" "| |", txtNode "" "Ping!"]
, [txtNode "" "| <|", txtNode "" "Pong!"]
, [txtNode "" "| <-|", txtNode "" "Pong!"]
, [txtNode "" "| <- |", txtNode "" "Pong!"]
, [txtNode "" "| <- |", txtNode "" "Pong!"]
, [txtNode "" "|<- |", txtNode "" "Pong!"]
, [txtNode "" "|- |", txtNode "" "Pong!"]
, [txtNode "" "| |", txtNode "" "Pong!"]
]
, ProngConstructor $ constModule projectDescriptionNode
, ProngConstructor "About" $ constModule projectDescriptionNode
]