io.pedestal.service.resources

added in 0.8.0

Creation of routes to expose file system or classpath resources as GET-able URIs.

This is an alternative to io.pedestal.http.ring-middlewares that provide interceptors (which bypass routing); these functions return RoutingFragments that can be combined to as part of the application’s routing table.

file-routes

(file-routes opts)

Returns a RoutingFragment of routes to access files on the file system.

resource-routes

(resource-routes opts)

Returns a RoutingFragment of routes to access files on the classpath.