Timeout
Setting request timeout with minimum effort
Overview
SugoiJS provides an easy way to set the timeout for a request based on the endpoint using the @Timeout
decorator.
@Timeout decorator
Using the @Timeout
decorator we can set a timeout on a method and define a callback in case of a timeout.
Timeout(ms: number, onTimeout?: (req, res) => void)
Example
Last updated