AssetService
com.alecdorrington.assetloader.tapir.AssetService
class AssetService[F[_]](externalPath: EndpointInput[Unit], internalPath: Path, maxAge: Int = ...) extends AssetApi, TapirService[Any, F]
A Tapir service for serving static assets loaded by an AssetLoader.
Type parameters
- F
-
The effect type (e.g.
FutureorIO).
Value parameters
- externalPath
-
The URL path prefix for the endpoint, e.g. "
assets". - internalPath
-
The root directory on the server's file system where assets are stored, relative to the directory of the running server process, e.g. "
src/main/resources". - maxAge
-
The maximum age (in seconds) for which an asset should be considered fresh for caching purposes. Caching is disabled by default (
0).
Attributes
- Graph
-
- Supertypes
Members list
In this article