MCPcopy
hub / github.com/fastify/fastify / barInstance

Function barInstance

test/genReqId.test.js:188–197  ·  view source on GitHub ↗
(instance, opts, next)

Source from the content-addressed store, hash-verified

186 }
187
188 const barInstance = function (instance, opts, next) {
189 instance.setGenReqId(function (req) {
190 return 'bar'
191 })
192 instance.get('/', (req, reply) => {
193 t.assert.ok(req.id)
194 reply.send({ id: req.id })
195 })
196 next()
197 }
198
199 const fooInstance = function (instance, opts, next) {
200 instance.register(bazInstance, { prefix: 'baz' })

Callers

nothing calls this directly

Calls 3

nextFunction · 0.85
setGenReqIdMethod · 0.80
sendMethod · 0.80

Tested by

no test coverage detected