Module

Yoga.Fastify.OmLayer

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

#FastifyConfig Source

type FastifyConfig = { host :: Host, port :: Port }

Fastify server configuration

#FastifyL Source

type FastifyL :: Row Type -> Row Typetype FastifyL r = (fastify :: Fastify | r)

Row type for Fastify service

#fastifyLayer Source

fastifyLayer :: forall r. OmLayer (fastifyConfig :: FastifyConfig | r) () (Record (FastifyL ()))

Create a Fastify layer that provides Fastify server as a service Requires FastifyConfig in context Note: This creates the server but doesn't start listening - use fastifyServerLayer for that

#fastifyLayer' Source

fastifyLayer' :: forall r. FastifyConfig -> OmLayer r () (Record (FastifyL ()))

Create a Fastify layer with inline config Useful when you don't need config from context