Skip to content

Latest commit

 

History

History
132 lines (97 loc) · 1.54 KB

File metadata and controls

132 lines (97 loc) · 1.54 KB

Module Node.Express.Types

EXPRESS

data EXPRESS :: !

ExpressM

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.

Application

data Application :: *

Event

data Event :: *

Response

data Response :: *

Request

data Request :: *

Protocol

data Protocol
  = Http
  | Https
Instances
Show Protocol
IsForeign Protocol

Method

data Method
  = ALL
  | GET
  | POST
  | PUT
  | DELETE
  | OPTIONS
  | HEAD
  | TRACE
  | CustomMethod String
Instances
Show Method
IsForeign Method

Port

type Port = Int

Path

type Path = String

RoutePattern

class RoutePattern a
Instances
RoutePattern String
RoutePattern Regex

RequestParam

class RequestParam a
Instances
RequestParam String
RequestParam Number

CookieOptions

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
Instances
Default CookieOptions