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

Instances

#serve Source

serve :: forall layout handlers m content. 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.