TapirStaticContentEndpoints
Static content endpoints, including files and resources.
Value members
Concrete methods
A server endpoint, which exposes a single file from local storage found at systemPath
, using the given path
.
A server endpoint, which exposes a single file from local storage found at systemPath
, using the given path
.
fileServerEndpoint("static" / "hello.html")("/home/app/static/data.html")
A server endpoint, which exposes files from local storage found at systemPath
, using the given prefix
.
Typically, the prefix is a path, but it can also contain other inputs. For example:
A server endpoint, which exposes files from local storage found at systemPath
, using the given prefix
.
Typically, the prefix is a path, but it can also contain other inputs. For example:
filesServerEndpoint("static" / "files")("/home/app/static")
A request to /static/files/css/styles.css
will try to read the /home/app/static/css/styles.css
file.
A server endpoint, which exposes a single resource available from the given classLoader
at resourcePath
,
using the given path
.
A server endpoint, which exposes a single resource available from the given classLoader
at resourcePath
,
using the given path
.
resourceServerEndpoint("static" / "hello.html")(classOf[App].getClassLoader, "app/data.html")
A server endpoint, which exposes resources available from the given classLoader
, using the given prefix
.
Typically, the prefix is a path, but it can also contain other inputs. For example:
A server endpoint, which exposes resources available from the given classLoader
, using the given prefix
.
Typically, the prefix is a path, but it can also contain other inputs. For example:
resourcesServerEndpoint("static" / "files")(classOf[App].getClassLoader, "app")
A request to /static/files/css/styles.css
will try to read the /app/css/styles.css
resource.