data EXPRESS :: !
type ExpressM e a = Eff (express :: EXPRESS | e) a
General monad, indicates that we're dealing with express.js related functions. Applications should use HandlerM and AppM primarily and ExpressM in rare cases.
data Application :: *
data Event :: *
data Response :: *
data Request :: *
data Protocol
= Http
| Https
instance showProtocol :: Show Protocol
instance isForeignProtocol :: IsForeign Protocol
data Method
= ALL
| GET
| POST
| PUT
| DELETE
| OPTIONS
| HEAD
| TRACE
| CustomMethod String
instance showMethod :: Show Method
instance isForeignMethod :: IsForeign Method
type Port = Int
type Path = String
class RoutePattern a
instance routePath :: RoutePattern String
instance routeRegex :: RoutePattern Regex
class RequestParam a
instance requestParamString :: RequestParam String
instance requestParamNumber :: RequestParam Number
newtype CookieOptions
= CookieOptions { maxAge :: Int, signed :: Boolean, path :: String }
Cookie options
- maxAge -- time in msecs
- signed -- use secret to sign if true
- path -- cookie path
instance defaultCookieOptions :: Default CookieOptions