compojure.route

Functions for defining common types of routes.

files

(files path)(files path options)

Returns a route for serving static files from a directory.

Accepts the following options:

:root
the root path where the files are stored, defaults to “public”
:mime-types
an optional map of file extensions to mime types

not-found

(not-found body)

Returns a route that always returns a 404 “Not Found” response with the supplied response body. The response body may be anything accepted by the response/render function.

resources

(resources path)(resources path options)

Returns a route for serving resources on the classpath.

Accepts the following options:

:root
the root prefix path of the resources, defaults to “public”
:mime-types
an optional map of file extensions to mime types