@dmno/fastify-integration
v0.0.1
Published
Fastify plugin to use configuration and secrets from DMNO
Downloads
127
Readme
Check out the docs for more information on how to use DMNO + Fastify.
*** THIS IS PREVIEW SOFTWARE AND SUBJECT TO RAPID CHANGE ***
If you have any questions, please reach out to us on Discord.
@dmno/fastify-integration
Provides tooling to integrate dmno into your fastify app
How to use
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"
},
// ...
}