Skip to content
Newer
Older
100644 21 lines (21 sloc) 4.56 KB
11b0195 @weavejester Update docs to 1.5.0
authored Mar 7, 2016
1 <!DOCTYPE html PUBLIC ""
2 "">
3 <html><head><meta charset="UTF-8" /><link href="css/default.css" rel="stylesheet" type="text/css" /><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>compojure.route documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Compojure</span> <span class="project-version">1.5.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>compojure</span></div></div></li><li class="depth-2 branch"><a href="compojure.coercions.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>coercions</span></div></a></li><li class="depth-2 branch"><a href="compojure.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="compojure.handler.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>handler</span></div></a></li><li class="depth-2 branch"><a href="compojure.middleware.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>middleware</span></div></a></li><li class="depth-2 branch"><a href="compojure.response.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>response</span></div></a></li><li class="depth-2 current"><a href="compojure.route.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>route</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="compojure.route.html#var-files"><div class="inner"><span>files</span></div></a></li><li class="depth-1"><a href="compojure.route.html#var-not-found"><div class="inner"><span>not-found</span></div></a></li><li class="depth-1"><a href="compojure.route.html#var-resources"><div class="inner"><span>resources</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">compojure.route</h1><div class="doc"><div class="markdown"><p>Functions for defining common types of routes.</p></div></div><div class="public anchor" id="var-files"><h3>files</h3><div class="usage"><code>(files path)</code><code>(files path options)</code></div><div class="doc"><div class="markdown"><p>Returns a route for serving static files from a directory.</p>
4 <p>Accepts the following options:</p>
5 <dl>
6 <dt>:root
7 </dt>
8 <dd>the root path where the files are stored, defaults to “public”</dd>
9 <dt>:mime-types
10 </dt>
11 <dd>an optional map of file extensions to mime types</dd>
12 </dl></div></div><div class="src-link"><a href="http://github.com/weavejester/compojure/blob/1.5.0/src/compojure/route.clj#L17">view source</a></div></div><div class="public anchor" id="var-not-found"><h3>not-found</h3><div class="usage"><code>(not-found body)</code></div><div class="doc"><div class="markdown"><p>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 <a href="compojure.response.html#var-render">response/render</a> function.</p></div></div><div class="src-link"><a href="http://github.com/weavejester/compojure/blob/1.5.0/src/compojure/route.clj#L54">view source</a></div></div><div class="public anchor" id="var-resources"><h3>resources</h3><div class="usage"><code>(resources path)</code><code>(resources path options)</code></div><div class="doc"><div class="markdown"><p>Returns a route for serving resources on the classpath.</p>
13 <p>Accepts the following options:</p>
14 <dl>
15 <dt>:root
16 </dt>
17 <dd>the root prefix path of the resources, defaults to “public”</dd>
18 <dt>:mime-types
19 </dt>
20 <dd>an optional map of file extensions to mime types</dd>
21 </dl></div></div><div class="src-link"><a href="http://github.com/weavejester/compojure/blob/1.5.0/src/compojure/route.clj#L36">view source</a></div></div></div></body></html>
Something went wrong with that request. Please try again.