Liking cljdoc? Tell your friends :D

compojure.route

Functions for defining common types of routes.

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

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
sourceraw docstring

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.

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.
sourceraw docstring

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

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
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close