@digital-alchemy/fastify-extension

24.9.1 • Public • Published

📨 Welcome to the Fastify Adapter Library

This library acts as a simple wrapper for Fastify, allowing it to be configured and loaded by @digital-alchemy workflows

🥡 Import Code

Add as a dependency, and add to your imports. Nice and easy

npm i @digital-alchemy/fastify-extension

Add to code

import { LIB_FASTIFY } from "@digital-alchemy/fastify-extension";

// application
const MY_APP = CreateApplication({
  libraries: [LIB_FASTIFY],
  name: "home_automation",
})

// library
export const MY_LIBRARY = CreateLibrary({
  depends: [LIB_FASTIFY],
  name: "special_logic",
})

🧲 Usage

export function Example({ fastify }: TServiceParams) {
  fastify.routes((fastify: FastifyInstance) => {
    fastify.post("/a", () => { /*...*/ });
    fastify.get("/b", () => { /*...*/ });
  });
}

Readme

Keywords

none

Package Sidebar

Install

npm i @digital-alchemy/fastify-extension

Weekly Downloads

70

Version

24.9.1

License

MIT

Unpacked Size

39.7 kB

Total Files

33

Last publish

Collaborators

  • zoe-codez