MCPcopy
hub / github.com/fastify/fastify / serverFactory

Function serverFactory

test/keep-alive-timeout.test.js:33–39  ·  view source on GitHub ↗
(handler, _)

Source from the content-addressed store, hash-verified

31 t.assert.notStrictEqual(http2Server.keepAliveTimeout, 3)
32
33 const serverFactory = (handler, _) => {
34 const server = http.createServer((req, res) => {
35 handler(req, res)
36 })
37 server.keepAliveTimeout = 5
38 return server
39 }
40 const customServer = Fastify({ keepAliveTimeout: 4, serverFactory }).server
41 t.assert.strictEqual(customServer.keepAliveTimeout, 5)
42})

Callers

nothing calls this directly

Calls 1

handlerFunction · 0.70

Tested by

no test coverage detected