Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.
/ fastify-boilerplate Public archive

various boilerplate stuff to build fastify apps faster

License

Notifications You must be signed in to change notification settings

tskau/fastify-boilerplate

Repository files navigation

@tskau/fastify-boilerplate

various boilerplate stuff to build fastify apps faster. unsurprisingly, primarily used in tskau's codebase.

installation

npm i @tskau/fastify-boilerplate
# yarn install @tskau/fastify-boilerplate
# pnpm add @tskau/fastify-boilerplate

avaliable functionality

  • createPluginWithStaticConfig<Options>(plugin, options) - creates the plugin that registers the given plugin with the given options.
  • createPluginWithRuntimeConfig<Options>(plugin, optionsGenerator) - creates the plugin that registers the given plugin with the generated options.
  • createPluginOfCustomFields<Fields>(plugin, fields) - creates the plugin that adds the generated custom fields to the fastify instance.
  • createEndpointPlugin(url, handlers) - creates the plugin that registers the endpoint using the simple method mapping
  • createRouterPlugin(baseUrl, routes) - creates the plugin that registers the router using the simple endpoint mapping

About

various boilerplate stuff to build fastify apps faster

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published