0 | ||| The main engine running the HTTP server, there is nothing about APIs here
13 | %hide Stellar.HTTP.Types.(.body)
15 | ||| Log levels for the application
25 | export
29 | export
40 | export
46 | export
50 | export
54 | export
58 | export
81 | where
87 | computeResponse : (PlainRequest -> IO PlainResponse) -> IncomingMessage -> ServerResponse -> JSCont ()
95 | ||| The most basic echo server takes a plein request and returns a plain response
96 | export
102 | ||| To create a server, we need a hostname, a port and a handler.
103 | ||| The server then runs asynchronously on node.
104 | export
111 | Listen.defaultOptions
113 | server.onRequest (\inc, out => logDebug "got new request" >> runCont (computeResponse handler inc out) )