0.1.1 • Published 5 years ago

fastify-server-timeout v0.1.1

Weekly downloads
772
License
MIT
Repository
github
Last release
5 years ago

fastify-server-timeout Build Status

Set timeout for incoming messages.

nodejs by default keep the request lived for 2 minutes. With this plugin you can change that timeout.

NB: this plugin change the nodejs core http.Server object. So registering this plugin, every requests will be affected by this timeout: this plugin breaks the encapsulation

Install

npm i fastify-server-timeout

Usage

const Fastify = require('fastify')
const plugin = require('fastify-server-timeout')

const fastify = Fastify({ logger: { level: 'silent' } })

fastify.register(plugin, {
  serverTimeout: 100 //ms
})