Community
🌐 fastify-c9h
fastify-c9hopen in new window is a Fastify plugin which decorates the Fastify instance with a c9h
property for accessing your application's configuration values.
import fastify from 'fastify';
import c9h from 'fastify-c9h';
const server = fastify({ logger: true });
server.register(c9h, {
/* c9h options */
});
server.get('/', async function () {
return { hello: this.c9h.your.config.variable };
});
// ...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14