Try to negotiate compression for dynamically generated response content and gzip compress it automatically.
The default template engine to use for rendering in cases where auto-detection doesn't work, like for inline
templates, defaults to tmpl
.
The default format to render if format is not set, defaults to html
. Note that changing the default away from
html
is not recommended, as it has the potential to break, for example, plugins with bundled templates.
Template engines.
Minimum output size in bytes required for compression to be used if enabled, defaults to 860
.
Directories to look for templates in, first one has the highest precedence.
Find a view for render parameters.
// Find path to JSON view
const suggestion = renderer.findView({view: 'foo', 'format': 'json'});
const {path} = suggestion;
Render output through one of the template engines.
Finalize dynamically generated response content and compress it if possible.
Optional
status?: numberGenerated using TypeDoc
Renderer class.