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

#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

#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)

#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)

#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