fastify-register-timeout
Register fastify
plugin with a timeout
NB: this plugin is going to DEPRECATED because it suggests a bad approach.
Install
npm i --save fastify-register-timeout
Usage
Registering this plugin
fastify
to use like this
fastfiy
NB: in case of timeout, an exception is thrown with the function name as message. This is mean that the anonymous function should not be used here!
Why
There're two reason for this plugin:
- in some case you need to know if your external dependencies are reachable before starting your server.
- during the test, you need to know which plugin fails