mirror of
https://github.com/unisonweb/unison.git
synced 2024-11-14 16:28:34 +03:00
Some debugging stuff
This commit is contained in:
parent
8fd0495596
commit
8e02186a08
@ -9,7 +9,7 @@ import Set as S
|
||||
type alias Encoder a = a -> J.Value
|
||||
|
||||
render : Encoder a -> a -> String
|
||||
render ja a = J.encode 2 (ja a)
|
||||
render ja a = J.encode 0 (ja a)
|
||||
|
||||
contramap : (a -> b) -> Encoder b -> Encoder a
|
||||
contramap f j = j << f
|
||||
|
@ -52,7 +52,11 @@ originOptions = do
|
||||
S.addHeader "Access-Control-Allow-Headers" "Content-Type"
|
||||
|
||||
route :: ActionM () -> ActionM ()
|
||||
route action = originPolicy *> action
|
||||
route action = do
|
||||
originPolicy
|
||||
body <- S.body
|
||||
liftIO (putStrLn ("request body\n" ++ show body))
|
||||
action
|
||||
|
||||
server :: Int -> Node IO Reference T.Type E.Term -> IO ()
|
||||
server port node = S.scotty port $ do
|
||||
|
Loading…
Reference in New Issue
Block a user