Module
Nodetrout.Internal.Server.Node
- Package
- purescript-nodetrout
- Repository
- nsaunders/purescript-nodetrout
This module contains the request handling logic related to node-http
.
#ResponseWritable Source
class ResponseWritable content where
Specifies how to write content
to a response stream.
Members
writeResponse :: Writable () -> content -> Effect Unit
Instances
#serve Source
serve :: forall content m handlers layout. Monad m => MonadEffect m => ResponseWritable content => Router layout (Record handlers) m (Tuple MediaType content) => Proxy layout -> Record handlers -> (m ~> Aff) -> (Error -> Effect Unit) -> Request -> Response -> Effect Unit
Creates a node-http
-compatible request handler of type
Request -> Response -> Effect Unit
which executes the specified routing
logic.