Module
Node.Express.App
- Package
- purescript-express
- Repository
- nkly/purescript-express
#makeHttpServer Source
makeHttpServer :: forall e1. App e1 -> ExpressM e1 Server
Create a Node.HTTP server from the Express application. HTTP version
#makeHttpsServer Source
makeHttpsServer :: forall e1. App e1 -> ExpressM e1 Server
Create a Node.HTTP server from the Express application. HTTPS version
#apply Source
apply :: forall e. App e -> Application -> ExpressM e Unit
Apply App actions to existent Express.js application
#useExternal Source
useExternal :: forall e. Fn3 Request Response (ExpressM e Unit) (ExpressM e Unit) -> App e
Use any function as middleware. Introduced to ease usage of a bunch of external middleware written for express.js. See http://expressjs.com/4x/api.html#middleware
#useOnParam Source
useOnParam :: forall e. String -> (String -> Handler e) -> App e
Process route param with specified handler.
#useOnError Source
useOnError :: forall e. (Error -> Handler e) -> App e
Use error handler. Probably this should be the last middleware to attach.
#setProp Source
setProp :: forall a e. Decode a => String -> a -> App e
Set application property. See http://expressjs.com/4x/api.html#app-settings
#http Source
http :: forall r e. RoutePattern r => Method -> r -> Handler e -> App e
Bind specified handler to handle request matching route and method.