MCPcopy Create free account
hub / github.com/fastify/fastify / handler

Function handler

test/internals/server.test.js:9–12  ·  view source on GitHub ↗
(req, res)

Source from the content-addressed store, hash-verified

7const { createServer } = require('../../lib/server')
8
9const handler = (req, res) => {
10 res.writeHead(200, { 'Content-Type': 'application/json' })
11 res.end(JSON.stringify({ data: 'Hello World!' }))
12}
13
14test('start listening', async t => {
15 const { server, listen } = createServer({}, handler)

Callers 1

serverFactoryFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected