StaticResourceHandler

class StaticResourceHandler(resourceBasePath: String, urlPrefix: String) : HttpHandler

HTTP handler that serves static files from classpath resources.

This handler is designed to serve the compiled JavaScript files and other static assets that are bundled in the JAR file under the resources directory.

Parameters

resourceBasePath

The base path in the classpath where resources are located (e.g., "static")

urlPrefix

The URL prefix to strip from incoming requests (e.g., "/static")

Constructors

Link copied to clipboard
constructor(resourceBasePath: String, urlPrefix: String)

Functions

Link copied to clipboard
open override fun handleRequest(exchange: HttpServerExchange)