Build book from commit aff2229151

This commit is contained in:
Automatic build 2017-09-14 15:09:01 +00:00
parent c21cfeedf5
commit 8e380f14eb
10 changed files with 13 additions and 13 deletions

View file

@ -323,9 +323,9 @@
<section class="normal markdown-section">
<h2 id="compiling-middleware">Compiling Middleware</h2>
<p>The <a href="#meta-data-based-extensions">meta-data extensions</a> are a easy way to extend the system. Routes meta-data can be transformed into any shape (records, functions etc.) in route compilation, enabling fast access at request-time.</p>
<p>The <a href="ring.html#meta-data-based-extensions">meta-data extensions</a> are a easy way to extend the system. Routes meta-data can be transformed into any shape (records, functions etc.) in route compilation, enabling fast access at request-time.</p>
<p>Still, we can do better. As we know the exact route that interceptor/middleware is linked to, we can pass the (compiled) route information into the interceptor/middleware at creation-time. It can extract and transform relevant data just for it and pass it into the actual request-handler via a closure - yielding faster runtime processing.</p>
<p>To do this we use <a href="#middleware-records">middleware records</a> <code>:gen</code> hook instead of the normal <code>:wrap</code>. <code>:gen</code> expects a function of <code>route-meta router-opts =&gt; wrap</code>. Middleware can also return <code>nil</code>, which effective unmounts the middleware. Why mount a <code>wrap-enforce-roles</code> middleware for a route if there are no roles required for it?</p>
<p>To do this we use <a href="ring.html#middleware-records">middleware records</a> <code>:gen</code> hook instead of the normal <code>:wrap</code>. <code>:gen</code> expects a function of <code>route-meta router-opts =&gt; wrap</code>. Middleware can also return <code>nil</code>, which effective unmounts the middleware. Why mount a <code>wrap-enforce-roles</code> middleware for a route if there are no roles required for it?</p>
<p>To demonstrate the two approaches, below are response coercion middleware written as normal ring middleware function and as middleware record with <code>:gen</code>. These are the actual codes are from <a href="https://github.com/metosin/reitit/blob/master/src/reitit/coercion.cljc" target="_blank"><code>reitit.coercion</code></a>:</p>
<h3 id="naive">Naive</h3>
<ul>
@ -428,7 +428,7 @@
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Compiling middleware","level":"1.5","depth":1,"next":{"title":"Validating route-trees","level":"1.6","depth":1,"path":"validating.md","ref":"validating.md","articles":[]},"previous":{"title":"Parameter coercion","level":"1.4","depth":1,"path":"parameter_coercion.md","ref":"parameter_coercion.md","articles":[]},"dir":"ltr"},"config":{"plugins":["editlink","github","highlight"],"root":"doc","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"editlink":{"label":"Edit This Page","multilingual":false,"base":"https://github.com/metosin/reitit/tree/master/doc"},"github":{"url":"https://github.com/metosin/reitit"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"gitbook":"*"},"file":{"path":"compiling_middleware.md","mtime":"2017-09-14T14:39:52.093Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-14T14:40:29.150Z"},"basePath":".","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Compiling middleware","level":"1.5","depth":1,"next":{"title":"Validating route-trees","level":"1.6","depth":1,"path":"validating.md","ref":"validating.md","articles":[]},"previous":{"title":"Parameter coercion","level":"1.4","depth":1,"path":"parameter_coercion.md","ref":"parameter_coercion.md","articles":[]},"dir":"ltr"},"config":{"plugins":["editlink","github","highlight"],"root":"doc","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"editlink":{"label":"Edit This Page","multilingual":false,"base":"https://github.com/metosin/reitit/tree/master/doc"},"github":{"url":"https://github.com/metosin/reitit"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"gitbook":"*"},"file":{"path":"compiling_middleware.md","mtime":"2017-09-14T15:08:32.263Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-14T15:08:59.979Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>

View file

@ -403,7 +403,7 @@
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Configuring routers","level":"1.7","depth":1,"next":{"title":"TODO: Merging route-trees","level":"1.8","depth":1,"ref":"","articles":[]},"previous":{"title":"Validating route-trees","level":"1.6","depth":1,"path":"validating.md","ref":"validating.md","articles":[]},"dir":"ltr"},"config":{"plugins":["editlink","github","highlight"],"root":"doc","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"editlink":{"label":"Edit This Page","multilingual":false,"base":"https://github.com/metosin/reitit/tree/master/doc"},"github":{"url":"https://github.com/metosin/reitit"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"gitbook":"*"},"file":{"path":"configuring_routers.md","mtime":"2017-09-14T14:39:52.093Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-14T14:40:29.150Z"},"basePath":".","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Configuring routers","level":"1.7","depth":1,"next":{"title":"TODO: Merging route-trees","level":"1.8","depth":1,"ref":"","articles":[]},"previous":{"title":"Validating route-trees","level":"1.6","depth":1,"path":"validating.md","ref":"validating.md","articles":[]},"dir":"ltr"},"config":{"plugins":["editlink","github","highlight"],"root":"doc","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"editlink":{"label":"Edit This Page","multilingual":false,"base":"https://github.com/metosin/reitit/tree/master/doc"},"github":{"url":"https://github.com/metosin/reitit"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"gitbook":"*"},"file":{"path":"configuring_routers.md","mtime":"2017-09-14T15:08:32.263Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-14T15:08:59.979Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>

View file

@ -367,7 +367,7 @@
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Introduction","level":"1.1","depth":1,"next":{"title":"Routing","level":"1.2","depth":1,"ref":"","articles":[{"title":"Route syntax","level":"1.2.1","depth":2,"path":"routing/route_syntax.md","ref":"routing/route_syntax.md","articles":[]},{"title":"Routers","level":"1.2.2","depth":2,"path":"routing/routers.md","ref":"routing/routers.md","articles":[]},{"title":"Route metadata","level":"1.2.3","depth":2,"path":"routing/route_metadata.md","ref":"routing/route_metadata.md","articles":[]},{"title":"Route conflicts","level":"1.2.4","depth":2,"path":"routing/route_conflicts.md","ref":"routing/route_conflicts.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["editlink","github","highlight"],"root":"doc","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"editlink":{"label":"Edit This Page","multilingual":false,"base":"https://github.com/metosin/reitit/tree/master/doc"},"github":{"url":"https://github.com/metosin/reitit"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"gitbook":"*"},"file":{"path":"README.md","mtime":"2017-09-14T14:39:52.093Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-14T14:40:29.150Z"},"basePath":".","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Introduction","level":"1.1","depth":1,"next":{"title":"Routing","level":"1.2","depth":1,"ref":"","articles":[{"title":"Route syntax","level":"1.2.1","depth":2,"path":"routing/route_syntax.md","ref":"routing/route_syntax.md","articles":[]},{"title":"Routers","level":"1.2.2","depth":2,"path":"routing/routers.md","ref":"routing/routers.md","articles":[]},{"title":"Route metadata","level":"1.2.3","depth":2,"path":"routing/route_metadata.md","ref":"routing/route_metadata.md","articles":[]},{"title":"Route conflicts","level":"1.2.4","depth":2,"path":"routing/route_conflicts.md","ref":"routing/route_conflicts.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["editlink","github","highlight"],"root":"doc","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"editlink":{"label":"Edit This Page","multilingual":false,"base":"https://github.com/metosin/reitit/tree/master/doc"},"github":{"url":"https://github.com/metosin/reitit"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"gitbook":"*"},"file":{"path":"README.md","mtime":"2017-09-14T15:08:32.263Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-14T15:08:59.979Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>

View file

@ -441,7 +441,7 @@
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Parameter coercion","level":"1.4","depth":1,"next":{"title":"Compiling middleware","level":"1.5","depth":1,"path":"compiling_middleware.md","ref":"compiling_middleware.md","articles":[]},"previous":{"title":"Ring support","level":"1.3","depth":1,"path":"ring.md","ref":"ring.md","articles":[]},"dir":"ltr"},"config":{"plugins":["editlink","github","highlight"],"root":"doc","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"editlink":{"label":"Edit This Page","multilingual":false,"base":"https://github.com/metosin/reitit/tree/master/doc"},"github":{"url":"https://github.com/metosin/reitit"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"gitbook":"*"},"file":{"path":"parameter_coercion.md","mtime":"2017-09-14T14:39:52.093Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-14T14:40:29.150Z"},"basePath":".","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Parameter coercion","level":"1.4","depth":1,"next":{"title":"Compiling middleware","level":"1.5","depth":1,"path":"compiling_middleware.md","ref":"compiling_middleware.md","articles":[]},"previous":{"title":"Ring support","level":"1.3","depth":1,"path":"ring.md","ref":"ring.md","articles":[]},"dir":"ltr"},"config":{"plugins":["editlink","github","highlight"],"root":"doc","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"editlink":{"label":"Edit This Page","multilingual":false,"base":"https://github.com/metosin/reitit/tree/master/doc"},"github":{"url":"https://github.com/metosin/reitit"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"gitbook":"*"},"file":{"path":"parameter_coercion.md","mtime":"2017-09-14T15:08:32.263Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-14T15:08:59.979Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>

View file

@ -528,7 +528,7 @@
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Ring support","level":"1.3","depth":1,"next":{"title":"Parameter coercion","level":"1.4","depth":1,"path":"parameter_coercion.md","ref":"parameter_coercion.md","articles":[]},"previous":{"title":"Route conflicts","level":"1.2.4","depth":2,"path":"routing/route_conflicts.md","ref":"routing/route_conflicts.md","articles":[]},"dir":"ltr"},"config":{"plugins":["editlink","github","highlight"],"root":"doc","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"editlink":{"label":"Edit This Page","multilingual":false,"base":"https://github.com/metosin/reitit/tree/master/doc"},"github":{"url":"https://github.com/metosin/reitit"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"gitbook":"*"},"file":{"path":"ring.md","mtime":"2017-09-14T14:39:52.093Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-14T14:40:29.150Z"},"basePath":".","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Ring support","level":"1.3","depth":1,"next":{"title":"Parameter coercion","level":"1.4","depth":1,"path":"parameter_coercion.md","ref":"parameter_coercion.md","articles":[]},"previous":{"title":"Route conflicts","level":"1.2.4","depth":2,"path":"routing/route_conflicts.md","ref":"routing/route_conflicts.md","articles":[]},"dir":"ltr"},"config":{"plugins":["editlink","github","highlight"],"root":"doc","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"editlink":{"label":"Edit This Page","multilingual":false,"base":"https://github.com/metosin/reitit/tree/master/doc"},"github":{"url":"https://github.com/metosin/reitit"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"gitbook":"*"},"file":{"path":"ring.md","mtime":"2017-09-14T15:08:32.263Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-14T15:08:59.979Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>

View file

@ -386,7 +386,7 @@
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Route conflicts","level":"1.2.4","depth":2,"next":{"title":"Ring support","level":"1.3","depth":1,"path":"ring.md","ref":"ring.md","articles":[]},"previous":{"title":"Route metadata","level":"1.2.3","depth":2,"path":"routing/route_metadata.md","ref":"routing/route_metadata.md","articles":[]},"dir":"ltr"},"config":{"plugins":["editlink","github","highlight"],"root":"doc","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"editlink":{"label":"Edit This Page","multilingual":false,"base":"https://github.com/metosin/reitit/tree/master/doc"},"github":{"url":"https://github.com/metosin/reitit"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"gitbook":"*"},"file":{"path":"routing/route_conflicts.md","mtime":"2017-09-14T14:39:52.093Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-14T14:40:29.150Z"},"basePath":"..","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Route conflicts","level":"1.2.4","depth":2,"next":{"title":"Ring support","level":"1.3","depth":1,"path":"ring.md","ref":"ring.md","articles":[]},"previous":{"title":"Route metadata","level":"1.2.3","depth":2,"path":"routing/route_metadata.md","ref":"routing/route_metadata.md","articles":[]},"dir":"ltr"},"config":{"plugins":["editlink","github","highlight"],"root":"doc","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"editlink":{"label":"Edit This Page","multilingual":false,"base":"https://github.com/metosin/reitit/tree/master/doc"},"github":{"url":"https://github.com/metosin/reitit"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"gitbook":"*"},"file":{"path":"routing/route_conflicts.md","mtime":"2017-09-14T15:08:32.267Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-14T15:08:59.979Z"},"basePath":"..","book":{"language":""}});
});
</script>
</div>

View file

@ -364,7 +364,7 @@
<span class="hljs-comment">; :path &quot;/api/admin/users&quot;}</span>
</code></pre>
<p>On match, route meta-data is returned and can interpreted by the application.</p>
<p>Routers also support meta-data compilation enabling things like fast <a href="https://github.com/ring-clojure/ring" target="_blank">Ring</a> or <a href="http://pedestal.io/" target="_blank">Pedestal</a> -style handlers. Compilation results are found under <code>:result</code> in the match. See <a href="#configuring-routers">configuring routers</a> for details.</p>
<p>Routers also support meta-data compilation enabling things like fast <a href="https://github.com/ring-clojure/ring" target="_blank">Ring</a> or <a href="http://pedestal.io/" target="_blank">Pedestal</a> -style handlers. Compilation results are found under <code>:result</code> in the match. See <a href="../configuring_routers.html">configuring routers</a> for details.</p>
</section>
@ -408,7 +408,7 @@
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Route metadata","level":"1.2.3","depth":2,"next":{"title":"Route conflicts","level":"1.2.4","depth":2,"path":"routing/route_conflicts.md","ref":"routing/route_conflicts.md","articles":[]},"previous":{"title":"Routers","level":"1.2.2","depth":2,"path":"routing/routers.md","ref":"routing/routers.md","articles":[]},"dir":"ltr"},"config":{"plugins":["editlink","github","highlight"],"root":"doc","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"editlink":{"label":"Edit This Page","multilingual":false,"base":"https://github.com/metosin/reitit/tree/master/doc"},"github":{"url":"https://github.com/metosin/reitit"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"gitbook":"*"},"file":{"path":"routing/route_metadata.md","mtime":"2017-09-14T14:39:52.093Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-14T14:40:29.150Z"},"basePath":"..","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Route metadata","level":"1.2.3","depth":2,"next":{"title":"Route conflicts","level":"1.2.4","depth":2,"path":"routing/route_conflicts.md","ref":"routing/route_conflicts.md","articles":[]},"previous":{"title":"Routers","level":"1.2.2","depth":2,"path":"routing/routers.md","ref":"routing/routers.md","articles":[]},"dir":"ltr"},"config":{"plugins":["editlink","github","highlight"],"root":"doc","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"editlink":{"label":"Edit This Page","multilingual":false,"base":"https://github.com/metosin/reitit/tree/master/doc"},"github":{"url":"https://github.com/metosin/reitit"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"gitbook":"*"},"file":{"path":"routing/route_metadata.md","mtime":"2017-09-14T15:08:32.267Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-14T15:08:59.979Z"},"basePath":"..","book":{"language":""}});
});
</script>
</div>

View file

@ -388,7 +388,7 @@
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Route syntax","level":"1.2.1","depth":2,"next":{"title":"Routers","level":"1.2.2","depth":2,"path":"routing/routers.md","ref":"routing/routers.md","articles":[]},"previous":{"title":"Routing","level":"1.2","depth":1,"ref":"","articles":[{"title":"Route syntax","level":"1.2.1","depth":2,"path":"routing/route_syntax.md","ref":"routing/route_syntax.md","articles":[]},{"title":"Routers","level":"1.2.2","depth":2,"path":"routing/routers.md","ref":"routing/routers.md","articles":[]},{"title":"Route metadata","level":"1.2.3","depth":2,"path":"routing/route_metadata.md","ref":"routing/route_metadata.md","articles":[]},{"title":"Route conflicts","level":"1.2.4","depth":2,"path":"routing/route_conflicts.md","ref":"routing/route_conflicts.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["editlink","github","highlight"],"root":"doc","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"editlink":{"label":"Edit This Page","multilingual":false,"base":"https://github.com/metosin/reitit/tree/master/doc"},"github":{"url":"https://github.com/metosin/reitit"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"gitbook":"*"},"file":{"path":"routing/route_syntax.md","mtime":"2017-09-14T14:39:52.093Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-14T14:40:29.150Z"},"basePath":"..","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Route syntax","level":"1.2.1","depth":2,"next":{"title":"Routers","level":"1.2.2","depth":2,"path":"routing/routers.md","ref":"routing/routers.md","articles":[]},"previous":{"title":"Routing","level":"1.2","depth":1,"ref":"","articles":[{"title":"Route syntax","level":"1.2.1","depth":2,"path":"routing/route_syntax.md","ref":"routing/route_syntax.md","articles":[]},{"title":"Routers","level":"1.2.2","depth":2,"path":"routing/routers.md","ref":"routing/routers.md","articles":[]},{"title":"Route metadata","level":"1.2.3","depth":2,"path":"routing/route_metadata.md","ref":"routing/route_metadata.md","articles":[]},{"title":"Route conflicts","level":"1.2.4","depth":2,"path":"routing/route_conflicts.md","ref":"routing/route_conflicts.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["editlink","github","highlight"],"root":"doc","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"editlink":{"label":"Edit This Page","multilingual":false,"base":"https://github.com/metosin/reitit/tree/master/doc"},"github":{"url":"https://github.com/metosin/reitit"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"gitbook":"*"},"file":{"path":"routing/route_syntax.md","mtime":"2017-09-14T15:08:32.267Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-14T15:08:59.979Z"},"basePath":"..","book":{"language":""}});
});
</script>
</div>

View file

@ -424,7 +424,7 @@
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Routers","level":"1.2.2","depth":2,"next":{"title":"Route metadata","level":"1.2.3","depth":2,"path":"routing/route_metadata.md","ref":"routing/route_metadata.md","articles":[]},"previous":{"title":"Route syntax","level":"1.2.1","depth":2,"path":"routing/route_syntax.md","ref":"routing/route_syntax.md","articles":[]},"dir":"ltr"},"config":{"plugins":["editlink","github","highlight"],"root":"doc","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"editlink":{"label":"Edit This Page","multilingual":false,"base":"https://github.com/metosin/reitit/tree/master/doc"},"github":{"url":"https://github.com/metosin/reitit"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"gitbook":"*"},"file":{"path":"routing/routers.md","mtime":"2017-09-14T14:39:52.093Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-14T14:40:29.150Z"},"basePath":"..","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Routers","level":"1.2.2","depth":2,"next":{"title":"Route metadata","level":"1.2.3","depth":2,"path":"routing/route_metadata.md","ref":"routing/route_metadata.md","articles":[]},"previous":{"title":"Route syntax","level":"1.2.1","depth":2,"path":"routing/route_syntax.md","ref":"routing/route_syntax.md","articles":[]},"dir":"ltr"},"config":{"plugins":["editlink","github","highlight"],"root":"doc","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"editlink":{"label":"Edit This Page","multilingual":false,"base":"https://github.com/metosin/reitit/tree/master/doc"},"github":{"url":"https://github.com/metosin/reitit"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"gitbook":"*"},"file":{"path":"routing/routers.md","mtime":"2017-09-14T15:08:32.267Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-14T15:08:59.979Z"},"basePath":"..","book":{"language":""}});
});
</script>
</div>

View file

@ -451,7 +451,7 @@
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Validating route-trees","level":"1.6","depth":1,"next":{"title":"Configuring routers","level":"1.7","depth":1,"path":"configuring_routers.md","ref":"configuring_routers.md","articles":[]},"previous":{"title":"Compiling middleware","level":"1.5","depth":1,"path":"compiling_middleware.md","ref":"compiling_middleware.md","articles":[]},"dir":"ltr"},"config":{"plugins":["editlink","github","highlight"],"root":"doc","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"editlink":{"label":"Edit This Page","multilingual":false,"base":"https://github.com/metosin/reitit/tree/master/doc"},"github":{"url":"https://github.com/metosin/reitit"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"gitbook":"*"},"file":{"path":"validating.md","mtime":"2017-09-14T14:39:52.093Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-14T14:40:29.150Z"},"basePath":".","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Validating route-trees","level":"1.6","depth":1,"next":{"title":"Configuring routers","level":"1.7","depth":1,"path":"configuring_routers.md","ref":"configuring_routers.md","articles":[]},"previous":{"title":"Compiling middleware","level":"1.5","depth":1,"path":"compiling_middleware.md","ref":"compiling_middleware.md","articles":[]},"dir":"ltr"},"config":{"plugins":["editlink","github","highlight"],"root":"doc","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"editlink":{"label":"Edit This Page","multilingual":false,"base":"https://github.com/metosin/reitit/tree/master/doc"},"github":{"url":"https://github.com/metosin/reitit"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"gitbook":"*"},"file":{"path":"validating.md","mtime":"2017-09-14T15:08:32.267Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-14T15:08:59.979Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>