0.0.2 • Published 1 year ago

@dmno/fastify-integration v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Check out the docs for more information on how to use DMNO + Fastify.

If you have any questions, please reach out to us on Discord.


@dmno/fastify-integration npm

Provides tooling to integrate DMNO into your Fastify app

Installation

npm add @dmno/fastify-integration

Example Usage

Import and register the dmnoFastifyPlugin when you initialize Fastify.

import Fastify from 'fastify';
import { dmnoFastifyPlugin } from '@dmno/fastify-integration';

const fastify = Fastify({ /* your config */ })

// register the DMNO fastify plugin
fastify.register(dmnoFastifyPlugin);

Adjust your package json script to run via dmno run, which will first resolve and validate your config, and then inject it into the running process.

{
  "name": "your-fastify-app",
  "scripts": {
    "dev": "dmno run -w -- nodemon src/main.js",
    "start": "dmno run -- node src/main.js"
  },
  // ...
}