mirror of
https://github.com/metosin/reitit.git
synced 2025-12-20 17:41:11 +00:00
575 lines
25 KiB
HTML
575 lines
25 KiB
HTML
|
|
<!DOCTYPE HTML>
|
|
<html lang="" >
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
|
<title>Ring support · GitBook</title>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta name="description" content="">
|
|
<meta name="generator" content="GitBook 3.2.3">
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="gitbook/style.css">
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<meta name="HandheldFriendly" content="true"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
|
|
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
|
|
|
|
|
|
<link rel="next" href="parameter_coercion.html" />
|
|
|
|
|
|
<link rel="prev" href="routing/route_conflicts.html" />
|
|
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<div class="book">
|
|
<div class="book-summary">
|
|
|
|
|
|
<div id="book-search-input" role="search">
|
|
<input type="text" placeholder="Type to search" />
|
|
</div>
|
|
|
|
|
|
<nav role="navigation">
|
|
|
|
|
|
|
|
<ul class="summary">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="chapter " data-level="1.1" data-path="./">
|
|
|
|
<a href="./">
|
|
|
|
|
|
Introduction
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="1.2" >
|
|
|
|
<span>
|
|
|
|
|
|
Routing
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<ul class="articles">
|
|
|
|
|
|
<li class="chapter " data-level="1.2.1" data-path="routing/route_syntax.html">
|
|
|
|
<a href="routing/route_syntax.html">
|
|
|
|
|
|
Route syntax
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="1.2.2" data-path="routing/routers.html">
|
|
|
|
<a href="routing/routers.html">
|
|
|
|
|
|
Routers
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="1.2.3" data-path="routing/route_metadata.html">
|
|
|
|
<a href="routing/route_metadata.html">
|
|
|
|
|
|
Route metadata
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="1.2.4" data-path="routing/route_conflicts.html">
|
|
|
|
<a href="routing/route_conflicts.html">
|
|
|
|
|
|
Route conflicts
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li class="chapter active" data-level="1.3" data-path="ring.html">
|
|
|
|
<a href="ring.html">
|
|
|
|
|
|
Ring support
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="1.4" data-path="parameter_coercion.html">
|
|
|
|
<a href="parameter_coercion.html">
|
|
|
|
|
|
Parameter coercion
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="1.5" data-path="compiling_middleware.html">
|
|
|
|
<a href="compiling_middleware.html">
|
|
|
|
|
|
Compiling middleware
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="1.6" data-path="validating.html">
|
|
|
|
<a href="validating.html">
|
|
|
|
|
|
Validating route-trees
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="1.7" data-path="configuring_routers.html">
|
|
|
|
<a href="configuring_routers.html">
|
|
|
|
|
|
Configuring routers
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="1.8" >
|
|
|
|
<span>
|
|
|
|
|
|
TODO: Merging route-trees
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="1.9" >
|
|
|
|
<span>
|
|
|
|
|
|
TODO: Swagger & OpenAPI
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="1.10" >
|
|
|
|
<span>
|
|
|
|
|
|
TODO: Interceptors
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="divider"></li>
|
|
|
|
<li>
|
|
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
|
|
Published with GitBook
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
</nav>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="book-body">
|
|
|
|
<div class="body-inner">
|
|
|
|
|
|
|
|
<div class="book-header" role="navigation">
|
|
|
|
|
|
<!-- Title -->
|
|
<h1>
|
|
<i class="fa fa-circle-o-notch fa-spin"></i>
|
|
<a href="." >Ring support</a>
|
|
</h1>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="page-wrapper" tabindex="-1" role="main">
|
|
<div class="page-inner">
|
|
|
|
<div id="book-search-results">
|
|
<div class="search-noresults">
|
|
|
|
<section class="normal markdown-section">
|
|
|
|
<h1 id="ring-support">Ring support</h1>
|
|
<p><a href="https://github.com/ring-clojure/ring" target="_blank">Ring</a>-router adds support for ring concepts like <a href="https://github.com/ring-clojure/ring/wiki/Concepts#handlers" target="_blank">handlers</a>, <a href="https://github.com/ring-clojure/ring/wiki/Concepts#middleware" target="_blank">middleware</a> and routing based on <code>:request-method</code>. Ring-router is created with <code>reitit.ring/router</code> function. It runs a custom route compiler, creating a optimized stucture for handling route matches, with compiled middleware chain & handlers for all request methods. It also ensures that all routes have a <code>:handler</code> defined.</p>
|
|
<p>Simple Ring app:</p>
|
|
<pre><code class="lang-clj">(<span class="hljs-name">require</span> '[reitit.ring <span class="hljs-symbol">:as</span> ring])
|
|
|
|
(<span class="hljs-name"><span class="hljs-builtin-name">defn</span></span> handler [_]
|
|
{<span class="hljs-symbol">:status</span> <span class="hljs-number">200</span>, <span class="hljs-symbol">:body</span> <span class="hljs-string">"ok"</span>})
|
|
|
|
(<span class="hljs-name"><span class="hljs-builtin-name">def</span></span> app
|
|
(<span class="hljs-name">ring/ring-handler</span>
|
|
(<span class="hljs-name">ring/router</span>
|
|
[<span class="hljs-string">"/ping"</span> handler])))
|
|
</code></pre>
|
|
<p>Applying the handler:</p>
|
|
<pre><code class="lang-clj">(<span class="hljs-name">app</span> {<span class="hljs-symbol">:request-method</span> <span class="hljs-symbol">:get</span>, <span class="hljs-symbol">:uri</span> <span class="hljs-string">"/favicon.ico"</span>})
|
|
<span class="hljs-comment">; nil</span>
|
|
|
|
(<span class="hljs-name">app</span> {<span class="hljs-symbol">:request-method</span> <span class="hljs-symbol">:get</span>, <span class="hljs-symbol">:uri</span> <span class="hljs-string">"/ping"</span>})
|
|
<span class="hljs-comment">; {:status 200, :body "ok"}</span>
|
|
</code></pre>
|
|
<p>The expanded routes:</p>
|
|
<pre><code class="lang-clj">(<span class="hljs-name"><span class="hljs-builtin-name">-></span></span> app (<span class="hljs-name">ring/get-router</span>) (<span class="hljs-name">reitit/routes</span>))
|
|
<span class="hljs-comment">; [["/ping"</span>
|
|
<span class="hljs-comment">; {:handler #object[...]}</span>
|
|
<span class="hljs-comment">; #Methods{:any #Endpoint{:meta {:handler #object[...]},</span>
|
|
<span class="hljs-comment">; :handler #object[...],</span>
|
|
<span class="hljs-comment">; :middleware []}}]]</span>
|
|
</code></pre>
|
|
<p>Note that the compiled resuts as third element in the route vector.</p>
|
|
<h3 id="request-method-based-routing">Request-method based routing</h3>
|
|
<p>Handler are also looked under request-method keys: <code>:get</code>, <code>:head</code>, <code>:patch</code>, <code>:delete</code>, <code>:options</code>, <code>:post</code> or <code>:put</code>. Top-level handler is used if request-method based handler is not found.</p>
|
|
<pre><code class="lang-clj">(<span class="hljs-name"><span class="hljs-builtin-name">def</span></span> app
|
|
(<span class="hljs-name">ring/ring-handler</span>
|
|
(<span class="hljs-name">ring/router</span>
|
|
[<span class="hljs-string">"/ping"</span> {<span class="hljs-symbol">:name</span> :<span class="hljs-symbol">:ping</span>
|
|
<span class="hljs-symbol">:get</span> handler
|
|
<span class="hljs-symbol">:post</span> handler}])))
|
|
|
|
(<span class="hljs-name">app</span> {<span class="hljs-symbol">:request-method</span> <span class="hljs-symbol">:get</span>, <span class="hljs-symbol">:uri</span> <span class="hljs-string">"/ping"</span>})
|
|
<span class="hljs-comment">; {:status 200, :body "ok"}</span>
|
|
|
|
(<span class="hljs-name">app</span> {<span class="hljs-symbol">:request-method</span> <span class="hljs-symbol">:put</span>, <span class="hljs-symbol">:uri</span> <span class="hljs-string">"/ping"</span>})
|
|
<span class="hljs-comment">; nil</span>
|
|
</code></pre>
|
|
<p>Reverse routing:</p>
|
|
<pre><code class="lang-clj">(<span class="hljs-name"><span class="hljs-builtin-name">-></span></span> app
|
|
(<span class="hljs-name">ring/get-router</span>)
|
|
(<span class="hljs-name">reitit/match-by-name</span> :<span class="hljs-symbol">:ping</span>)
|
|
<span class="hljs-symbol">:path</span>)
|
|
<span class="hljs-comment">; "/ping"</span>
|
|
</code></pre>
|
|
<h3 id="middleware">Middleware</h3>
|
|
<p>Middleware can be added with a <code>:middleware</code> key, with a vector value of the following:</p>
|
|
<ol>
|
|
<li>ring middleware function <code>handler -> request -> response</code></li>
|
|
<li>vector of middleware function <code>handler ?args -> request -> response</code> and optinally it's args.</li>
|
|
</ol>
|
|
<p>A middleware and a handler:</p>
|
|
<pre><code class="lang-clj">(<span class="hljs-name"><span class="hljs-builtin-name">defn</span></span> wrap [handler id]
|
|
(<span class="hljs-name"><span class="hljs-builtin-name">fn</span></span> [request]
|
|
(<span class="hljs-name">handler</span> (<span class="hljs-name">update</span> request :<span class="hljs-symbol">:acc</span> (<span class="hljs-name">fnil</span> conj []) id))))
|
|
|
|
(<span class="hljs-name"><span class="hljs-builtin-name">defn</span></span> handler [{<span class="hljs-symbol">:keys</span> [:<span class="hljs-symbol">:acc</span>]}]
|
|
{<span class="hljs-symbol">:status</span> <span class="hljs-number">200</span>, <span class="hljs-symbol">:body</span> (<span class="hljs-name"><span class="hljs-builtin-name">conj</span></span> acc <span class="hljs-symbol">:handler</span>)})
|
|
</code></pre>
|
|
<p>App with nested middleware:</p>
|
|
<pre><code class="lang-clj">(<span class="hljs-name"><span class="hljs-builtin-name">def</span></span> app
|
|
(<span class="hljs-name">ring/ring-handler</span>
|
|
(<span class="hljs-name">ring/router</span>
|
|
[<span class="hljs-string">"/api"</span> {<span class="hljs-symbol">:middleware</span> [#(<span class="hljs-name">wrap</span> % <span class="hljs-symbol">:api</span>)]}
|
|
[<span class="hljs-string">"/ping"</span> handler]
|
|
[<span class="hljs-string">"/admin"</span> {<span class="hljs-symbol">:middleware</span> [[wrap <span class="hljs-symbol">:admin</span>]]}
|
|
[<span class="hljs-string">"/db"</span> {<span class="hljs-symbol">:middleware</span> [[wrap <span class="hljs-symbol">:db</span>]]
|
|
<span class="hljs-symbol">:delete</span> {<span class="hljs-symbol">:middleware</span> [#(<span class="hljs-name">wrap</span> % <span class="hljs-symbol">:delete</span>)]
|
|
<span class="hljs-symbol">:handler</span> handler}}]]])))
|
|
</code></pre>
|
|
<p>Middleware is applied correctly:</p>
|
|
<pre><code class="lang-clj">(<span class="hljs-name">app</span> {<span class="hljs-symbol">:request-method</span> <span class="hljs-symbol">:delete</span>, <span class="hljs-symbol">:uri</span> <span class="hljs-string">"/api/ping"</span>})
|
|
<span class="hljs-comment">; {:status 200, :body [:api :handler]}</span>
|
|
</code></pre>
|
|
<pre><code class="lang-clj">(<span class="hljs-name">app</span> {<span class="hljs-symbol">:request-method</span> <span class="hljs-symbol">:delete</span>, <span class="hljs-symbol">:uri</span> <span class="hljs-string">"/api/admin/db"</span>})
|
|
<span class="hljs-comment">; {:status 200, :body [:api :admin :db :delete :handler]}</span>
|
|
</code></pre>
|
|
<h3 id="middleware-records">Middleware Records</h3>
|
|
<p>Reitit supports first-class data-driven middleware via <code>reitit.middleware/Middleware</code> records, created with <code>reitit.middleware/create</code> function. The following keys have special purpose:</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>key</th>
|
|
<th>description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>:name</code></td>
|
|
<td>Name of the middleware as qualified keyword (optional,recommended for libs)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>:wrap</code></td>
|
|
<td>The actual middleware function of <code>handler args? => request => response</code></td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>:gen</code></td>
|
|
<td>Middleware compile function, see <a href="#compiling-middleware">compiling middleware</a>.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>When routes are compiled, all middleware are expanded (and optionally compiled) into <code>Middleware</code> and stored in compilation results for later use (api-docs etc). For actual request processing, they are unwrapped into normal middleware functions producing zero runtime performance penalty. Middleware expansion is backed by <code>reitit.middleware/IntoMiddleware</code> protocol, enabling plain clojure(script) maps to be used.</p>
|
|
<p>A Record:</p>
|
|
<pre><code class="lang-clj">(<span class="hljs-name">require</span> '[reitit.middleware <span class="hljs-symbol">:as</span> middleware])
|
|
|
|
(<span class="hljs-name"><span class="hljs-builtin-name">def</span></span> wrap2
|
|
(<span class="hljs-name">middleware/create</span>
|
|
{<span class="hljs-symbol">:name</span> :<span class="hljs-symbol">:wrap2</span>
|
|
<span class="hljs-symbol">:description</span> <span class="hljs-string">"a nice little mw, takes 1 arg."</span>
|
|
<span class="hljs-symbol">:wrap</span> wrap}))
|
|
</code></pre>
|
|
<p>As plain map:</p>
|
|
<pre><code class="lang-clj"><span class="hljs-comment">;; plain map</span>
|
|
(<span class="hljs-name"><span class="hljs-builtin-name">def</span></span> wrap3
|
|
{<span class="hljs-symbol">:name</span> :<span class="hljs-symbol">:wrap3</span>
|
|
<span class="hljs-symbol">:description</span> <span class="hljs-string">"a nice little mw, :api as arg"</span>
|
|
<span class="hljs-symbol">:wrap</span> (<span class="hljs-name"><span class="hljs-builtin-name">fn</span></span> [handler]
|
|
(<span class="hljs-name">wrap</span> handler <span class="hljs-symbol">:api</span>))})
|
|
</code></pre>
|
|
<h3 id="async-ring">Async Ring</h3>
|
|
<p>All built-in middleware provide both 2 and 3-arity and are compiled for both Clojure & ClojureScript, so they work with <a href="https://www.booleanknot.com/blog/2016/07/15/asynchronous-ring.html" target="_blank">Async Ring</a> and <a href="https://nodejs.org" target="_blank">Node.js</a> too.</p>
|
|
<h3 id="meta-data-based-extensions">Meta-data based extensions</h3>
|
|
<p><code>ring-handler</code> injects the <code>Match</code> into a request and it can be extracted at runtime with <code>reitit.ring/get-match</code>. This can be used to build dynamic extensions to the system.</p>
|
|
<p>Example middleware to guard routes based on user roles:</p>
|
|
<pre><code class="lang-clj">(<span class="hljs-name">require</span> '[clojure.set <span class="hljs-symbol">:as</span> set])
|
|
|
|
(<span class="hljs-name"><span class="hljs-builtin-name">defn</span></span> wrap-enforce-roles [handler]
|
|
(<span class="hljs-name"><span class="hljs-builtin-name">fn</span></span> [{<span class="hljs-symbol">:keys</span> [:<span class="hljs-symbol">:roles</span>] <span class="hljs-symbol">:as</span> request}]
|
|
(<span class="hljs-name"><span class="hljs-builtin-name">let</span></span> [required (<span class="hljs-name">some-></span> request (<span class="hljs-name">ring/get-match</span>) <span class="hljs-symbol">:meta</span> :<span class="hljs-symbol">:roles</span>)]
|
|
(<span class="hljs-name"><span class="hljs-builtin-name">if</span></span> (<span class="hljs-name"><span class="hljs-builtin-name">and</span></span> (<span class="hljs-name"><span class="hljs-builtin-name">seq</span></span> required) (<span class="hljs-name"><span class="hljs-builtin-name">not</span></span> (<span class="hljs-name">set/intersection</span> required roles)))
|
|
{<span class="hljs-symbol">:status</span> <span class="hljs-number">403</span>, <span class="hljs-symbol">:body</span> <span class="hljs-string">"forbidden"</span>}
|
|
(<span class="hljs-name">handler</span> request)))))
|
|
</code></pre>
|
|
<p>Mounted to an app via router meta-data (effecting all routes):</p>
|
|
<pre><code class="lang-clj">(<span class="hljs-name"><span class="hljs-builtin-name">def</span></span> handler (<span class="hljs-name"><span class="hljs-builtin-name">constantly</span></span> {<span class="hljs-symbol">:status</span> <span class="hljs-number">200</span>, <span class="hljs-symbol">:body</span> <span class="hljs-string">"ok"</span>}))
|
|
|
|
(<span class="hljs-name"><span class="hljs-builtin-name">def</span></span> app
|
|
(<span class="hljs-name">ring/ring-handler</span>
|
|
(<span class="hljs-name">ring/router</span>
|
|
[[<span class="hljs-string">"/api"</span>
|
|
[<span class="hljs-string">"/ping"</span> handler]
|
|
[<span class="hljs-string">"/admin"</span> {:<span class="hljs-symbol">:roles</span> #{<span class="hljs-symbol">:admin</span>}}
|
|
[<span class="hljs-string">"/ping"</span> handler]]]]
|
|
{<span class="hljs-symbol">:meta</span> {<span class="hljs-symbol">:middleware</span> [wrap-enforce-roles]}})))
|
|
</code></pre>
|
|
<p>Anonymous access to public route:</p>
|
|
<pre><code class="lang-clj">(<span class="hljs-name">app</span> {<span class="hljs-symbol">:request-method</span> <span class="hljs-symbol">:get</span>, <span class="hljs-symbol">:uri</span> <span class="hljs-string">"/api/ping"</span>})
|
|
<span class="hljs-comment">; {:status 200, :body "ok"}</span>
|
|
</code></pre>
|
|
<p>Anonymous access to guarded route:</p>
|
|
<pre><code class="lang-clj">(<span class="hljs-name">app</span> {<span class="hljs-symbol">:request-method</span> <span class="hljs-symbol">:get</span>, <span class="hljs-symbol">:uri</span> <span class="hljs-string">"/api/admin/ping"</span>})
|
|
<span class="hljs-comment">; {:status 403, :body "forbidden"}</span>
|
|
</code></pre>
|
|
<p>Authorized access to guarded route:</p>
|
|
<pre><code class="lang-clj">(<span class="hljs-name">app</span> {<span class="hljs-symbol">:request-method</span> <span class="hljs-symbol">:get</span>, <span class="hljs-symbol">:uri</span> <span class="hljs-string">"/api/admin/ping"</span>, :<span class="hljs-symbol">:roles</span> #{<span class="hljs-symbol">:admin</span>}})
|
|
<span class="hljs-comment">; {:status 200, :body "ok"}</span>
|
|
</code></pre>
|
|
|
|
|
|
</section>
|
|
|
|
</div>
|
|
<div class="search-results">
|
|
<div class="has-results">
|
|
|
|
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
|
<ul class="search-results-list"></ul>
|
|
|
|
</div>
|
|
<div class="no-results">
|
|
|
|
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<a href="routing/route_conflicts.html" class="navigation navigation-prev " aria-label="Previous page: Route conflicts">
|
|
<i class="fa fa-angle-left"></i>
|
|
</a>
|
|
|
|
|
|
<a href="parameter_coercion.html" class="navigation navigation-next " aria-label="Next page: Parameter coercion">
|
|
<i class="fa fa-angle-right"></i>
|
|
</a>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<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"],"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:20:32.192Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-14T14:21:05.600Z"},"basePath":".","book":{"language":""}});
|
|
});
|
|
</script>
|
|
</div>
|
|
|
|
|
|
<script src="gitbook/gitbook.js"></script>
|
|
<script src="gitbook/theme.js"></script>
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-editlink/plugin.js"></script>
|
|
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-github/plugin.js"></script>
|
|
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
|
|
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-search/search.js"></script>
|
|
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
|
|
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
|
|
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
|
|
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|
|
|