Skip to content

Eomm/fastify-server-timeout

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastify-server-timeout Build Status

This module is deprecated as the functionality is embedded in Fastify now. See https://www.fastify.io/docs/latest/Server/#keepalivetimeout for more details.

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
})

About

Set timeout for incoming messages

Resources

License

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%