Module

Yoga.Fastify.Fastify

Package
purescript-yoga-fastify
Repository
rowtype-yoga/purescript-yoga-fastify

#Fastify Source

data Fastify

Opaque Fastify instance

#FastifyRequest Source

data FastifyRequest

Opaque request object

#FastifyReply Source

data FastifyReply

Opaque reply object

#RouteHandler Source

type RouteHandler = FastifyRequest -> FastifyReply -> Aff Unit

Route handler type: takes request and reply, returns Aff Unit

#HttpServer Source

#HttpRequest Source

#HttpResponse Source

#NetSocket Source

#Buffer Source

data Buffer

#Host Source

newtype Host

Constructors

Instances

#Port Source

newtype Port

Constructors

Instances

#HTTPMethod Source

#RouteURL Source

newtype RouteURL

Constructors

Instances

#StatusCode Source

#AjvOptions Source

newtype AjvOptions

Constructors

Instances

#JsonSchema Source

newtype JsonSchema

Constructors

Instances

#RouteSchema Source

newtype RouteSchema

Constructors

Instances

#RouteConfig Source

newtype RouteConfig

Constructors

Instances

#RequestParsers Source

#CookieParser Source

newtype CookieParser

#FormBodyParser Source

#MultipartParser Source

#MultipartLimits Source

#ajvOptions Source

ajvOptions :: forall opts opts_. Union opts opts_ AjvCustomOptionsImpl => Record opts -> AjvOptions

#routeSchema Source

routeSchema :: forall opts opts_. Union opts opts_ RouteSchemaImpl => Record opts -> RouteSchema

#routeConfig Source

routeConfig :: forall opts opts_. Union opts opts_ RouteConfigImpl => Record opts -> RouteConfig

#requestParsers Source

requestParsers :: forall opts opts_. Union opts opts_ RequestParsersImpl => Record opts -> RequestParsers

Configure or disable the request parsers installed by fastify. Omitted entries retain the safe defaults, including multipart key-value bodies.

#cookieParser Source

cookieParser :: forall opts opts_. Union opts opts_ CookieParserOptionsImpl => Record opts -> CookieParser

#formBodyParser Source

formBodyParser :: forall opts opts_. Union opts opts_ FormBodyParserOptionsImpl => Record opts -> FormBodyParser

#multipartParser Source

multipartParser :: forall opts opts_. Union opts opts_ MultipartParserOptionsImpl => Record opts -> MultipartParser

#multipartLimits Source

multipartLimits :: forall opts opts_. Union opts opts_ MultipartLimitsImpl => Record opts -> MultipartLimits

#ListenOptionsImpl Source

type ListenOptionsImpl :: Row Typetype ListenOptionsImpl = (host :: Host, port :: Port)

#RouteOptionsImpl Source

type RouteOptionsImpl :: Row Typetype RouteOptionsImpl = (config :: RouteConfig, method :: HTTPMethod, schema :: RouteSchema, url :: RouteURL)

#FastifyOptionsImpl Source

type FastifyOptionsImpl :: Row Typetype FastifyOptionsImpl = (ajv :: AjvOptions, bodyLimit :: Int, disableRequestLogging :: Boolean, logger :: Boolean, requestIdHeader :: String, requestIdLogLabel :: String, requestParsers :: RequestParsers)

#AjvCustomOptionsImpl Source

type AjvCustomOptionsImpl :: Row Typetype AjvCustomOptionsImpl = (allErrors :: Boolean, coerceTypes :: Boolean, removeAdditional :: Boolean)

#RouteSchemaImpl Source

type RouteSchemaImpl :: Row Typetype RouteSchemaImpl = (body :: JsonSchema, headers :: JsonSchema, params :: JsonSchema, querystring :: JsonSchema, response :: Foreign)

#RouteConfigImpl Source

type RouteConfigImpl :: Row Typetype RouteConfigImpl = (rateLimit :: Foreign)

#RequestParsersImpl Source

type RequestParsersImpl :: Row Typetype RequestParsersImpl = (cookie :: CookieParser, formBody :: FormBodyParser, multipart :: MultipartParser)

#CookieParserOptionsImpl Source

type CookieParserOptionsImpl :: Row Typetype CookieParserOptionsImpl = (algorithm :: String, hook :: String, secret :: String)

#FormBodyParserOptionsImpl Source

#MultipartParserOptionsImpl Source

#MultipartLimitsImpl Source

type MultipartLimitsImpl :: Row Typetype MultipartLimitsImpl = (fieldNameSize :: Int, fieldSize :: Int, fields :: Int, fileSize :: Int, files :: Int, headerPairs :: Int, parts :: Int)

#fastify Source

fastify :: forall opts opts_. Union opts opts_ FastifyOptionsImpl => Record opts -> Effect Fastify

#route Source

route :: forall opts opts_. Union opts opts_ RouteOptionsImpl => Record opts -> RouteHandler -> Fastify -> Effect Unit

#get Source

get :: RouteURL -> RouteHandler -> Fastify -> Effect Unit

Convenience: GET route

#post Source

post :: RouteURL -> RouteHandler -> Fastify -> Effect Unit

Convenience: POST route

#put Source

put :: RouteURL -> RouteHandler -> Fastify -> Effect Unit

Convenience: PUT route

#delete Source

delete :: RouteURL -> RouteHandler -> Fastify -> Effect Unit

Convenience: DELETE route

#patch Source

patch :: RouteURL -> RouteHandler -> Fastify -> Effect Unit

Convenience: PATCH route

#listen Source

listen :: forall opts opts_. Union opts opts_ ListenOptionsImpl => Record opts -> Fastify -> Aff String