Kweb Default Configuration
A default KwebConfiguration using runtime arguments
Properties
If Kweb.debug is enabled, then pages that take longer than buildpageTimeout to load will display a warning message
Message that is shown to a disconnected client.
Enable stats for the client state cache. Small performance penalty per operation, large gains in observability. Consider this in production.
Clients that last connected more than clientStateTimeout will be cleaned up every minute.
If true, Kweb will handle favicon requests via a default plugin added if and only if no existing FaviconPlugin is found in the list of plugins. If false the user should add their own FaviconPlugin or handle favicon requests some other way (perhaps directly with Ktor).
By default, Kweb will handle all paths under /
, but this may not be desirable if you have other Ktor route handlers. This config option allows you to add a prefix to the Kweb route handler, e.g. /my_kweb_site
, so that only URLs under that path will be handled by Kweb.
Functions
Override this function to handle uncaught exceptions of client callbacks. E.g. if the browser sends a websocket message back to the kweb instance and the message handler throws an uncaught exception, kweb will invoke this exception handler to expose the fact that a message could not be properly handled