Skip to content

Latest commit

 

History

History
137 lines (99 loc) · 1.48 KB

File metadata and controls

137 lines (99 loc) · 1.48 KB

Module Node.Express.Types

Application

data Application :: Type

Event

data Event :: Type

Response

data Response :: Type

Request

data Request :: Type

Protocol

data Protocol
  = Http
  | Https
Instances
Show Protocol

decodeProtocol

decodeProtocol :: String -> Maybe Protocol

Method

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

decodeMethod

decodeMethod :: String -> Method

Host

type Host = String

Port

type Port = Int

Pipe

type Pipe = String

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