Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

tskau/fastify-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors