diff options
Diffstat (limited to 'docs/en/cowboy/2.4/manual/cowboy_router.compile')
-rw-r--r-- | docs/en/cowboy/2.4/manual/cowboy_router.compile/index.html | 93 |
1 files changed, 27 insertions, 66 deletions
diff --git a/docs/en/cowboy/2.4/manual/cowboy_router.compile/index.html b/docs/en/cowboy/2.4/manual/cowboy_router.compile/index.html index c3eb3884..1aac627b 100644 --- a/docs/en/cowboy/2.4/manual/cowboy_router.compile/index.html +++ b/docs/en/cowboy/2.4/manual/cowboy_router.compile/index.html @@ -62,87 +62,48 @@ <h1 class="lined-header"><span>cowboy_router:compile(3)</span></h1> -<div class="sect1"> <h2 id="_name">Name</h2> -<div class="sectionbody"> -<div class="paragraph"><p>cowboy_router:compile - Compile routes to the resources</p></div> -</div> -</div> -<div class="sect1"> +<p>cowboy_router:compile - Compile routes to the resources</p> <h2 id="_description">Description</h2> -<div class="sectionbody"> -<div class="listingblock"> -<div class="content"><!-- Generator: GNU source-highlight +<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8 by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -<pre><tt><span style="font-weight: bold"><span style="color: #000000">compile</span></span>(<span style="font-weight: bold"><span style="color: #000000">cowboy_router:routes</span></span>()) <span style="color: #990000">-></span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:dispatch_rules</span></span>()</tt></pre></div></div> -<div class="paragraph"><p>Compile routes to the resources.</p></div> -<div class="paragraph"><p>Takes a human readable list of routes and transforms it -into a form more efficient to process.</p></div> -</div> -</div> -<div class="sect1"> +<pre><tt><b><font color="#000000">compile</font></b>(<b><font color="#000000">cowboy_router:routes</font></b>()) <font color="#990000">-></font> <b><font color="#000000">cowboy_router:dispatch_rules</font></b>()</tt></pre> +</div></div> +<p>Compile routes to the resources.</p> +<p>Takes a human readable list of routes and transforms it into a form more efficient to process.</p> <h2 id="_arguments">Arguments</h2> -<div class="sectionbody"> -<div class="dlist"><dl> -<dt class="hdlist1"> -Routes -</dt> -<dd> -<p> -Human readable list of routes. -</p> +<dl><dt>Routes</dt> +<dd><p>Human readable list of routes.</p> </dd> -</dl></div> -</div> -</div> -<div class="sect1"> +</dl> <h2 id="_return_value">Return value</h2> -<div class="sectionbody"> -<div class="paragraph"><p>An opaque dispatch rules value is returned. This value -must be given to Cowboy as a middleware environment value.</p></div> -</div> -</div> -<div class="sect1"> +<p>An opaque dispatch rules value is returned. This value must be given to Cowboy as a middleware environment value.</p> <h2 id="_changelog">Changelog</h2> -<div class="sectionbody"> -<div class="ulist"><ul> -<li> -<p> -<strong>1.0</strong>: Function introduced. -</p> +<ul><li><strong>1.0</strong>: Function introduced. </li> -</ul></div> -</div> -</div> -<div class="sect1"> +</ul> <h2 id="_examples">Examples</h2> -<div class="sectionbody"> -<div class="listingblock"> -<div class="title">Compile routes and start a listener</div> -<div class="content"><!-- Generator: GNU source-highlight +<div class="listingblock"><div class="title">Compile routes and start a listener</div> +<div class="content"><!-- Generator: GNU source-highlight 3.1.8 by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> -<pre><tt><span style="color: #009900">Dispatch</span> <span style="color: #990000">=</span> <span style="font-weight: bold"><span style="color: #000000">cowboy_router:compile</span></span>([ - {<span style="color: #FF6600">'_'</span>, [ - {<span style="color: #FF0000">"/"</span>, <span style="color: #FF6600">toppage_h</span>, []}, - {<span style="color: #FF0000">"/[...], cowboy_static, {priv_dir, my_example_app, ""}}</span> -<span style="color: #FF0000"> ]}</span> -<span style="color: #FF0000">]),</span> - -<span style="color: #FF0000">{ok, _} = cowboy:start_clear(example, [{port, 8080}], #{</span> -<span style="color: #FF0000"> env => #{dispatch => Dispatch}</span> -<span style="color: #FF0000">}).</span></tt></pre></div></div> -</div> -</div> -<div class="sect1"> +<pre><tt><font color="#009900">Dispatch</font> <font color="#990000">=</font> <b><font color="#000000">cowboy_router:compile</font></b>([ + {<font color="#FF6600">'_'</font>, [ + {<font color="#FF0000">"/"</font>, <font color="#FF6600">toppage_h</font>, []}, + {<font color="#FF0000">"/[...], cowboy_static, {priv_dir, my_example_app, ""}}</font> +<font color="#FF0000"> ]}</font> +<font color="#FF0000">]),</font> + +<font color="#FF0000">{ok, _} = cowboy:start_clear(example, [{port, 8080}], #{</font> +<font color="#FF0000"> env => #{dispatch => Dispatch}</font> +<font color="#FF0000">}).</font></tt></pre> +</div></div> <h2 id="_see_also">See also</h2> -<div class="sectionbody"> -<div class="paragraph"><p><a href="../cowboy_router">cowboy_router(3)</a></p></div> -</div> -</div> +<p><a href="../cowboy_router">cowboy_router(3)</a></p> + |