summaryrefslogtreecommitdiffstats
path: root/docs/index.xml
diff options
context:
space:
mode:
Diffstat (limited to 'docs/index.xml')
-rw-r--r--docs/index.xml138
1 files changed, 48 insertions, 90 deletions
diff --git a/docs/index.xml b/docs/index.xml
index b62edf2e..8e02388c 100644
--- a/docs/index.xml
+++ b/docs/index.xml
@@ -322,6 +322,14 @@ your situation.</p></div>
</p>
</dd>
<dt class="hdlist1">
+<code>PROJECT_MOD</code>
+</dt>
+<dd>
+<p>
+ The application callback module.
+</p>
+</dd>
+<dt class="hdlist1">
<code>PROJECT_REGISTERED</code>
</dt>
<dd>
@@ -352,17 +360,7 @@ your situation.</p></div>
<div class="paragraph"><p>There’s no need for quotes or anything. The relevant part of
the Cowboy Makefile follows, if you need an example:</p></div>
<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="color: #009900">PROJECT =</span> cowboy
-<span style="color: #009900">PROJECT_DESCRIPTION =</span> Small<span style="color: #990000">,</span> fast<span style="color: #990000">,</span> modular HTTP server<span style="color: #990000">.</span>
-<span style="color: #009900">PROJECT_VERSION =</span> 2.0.0-pre.2
-<span style="color: #009900">PROJECT_REGISTERED =</span> cowboy_clock
-
-<span style="color: #009900">LOCAL_DEPS =</span> crypto
-<span style="color: #009900">DEPS =</span> cowlib ranch</tt></pre></div></div>
+<div class="content"></div></div>
<div class="paragraph"><p>Any space before and after the value is dropped.</p></div>
<div class="paragraph"><p><a href="../deps">Dependencies</a> are covered in details in
the next chapter.</p></div>
@@ -545,33 +543,19 @@ the <a href="http://www.erlang.org/doc/man/erlc.html">erlc Manual&
full list.</p></div>
<div class="paragraph"><p>By default, Erlang.mk will set the following options:</p></div>
<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="color: #009900">ERLC_OPTS =</span> -Werror <span style="color: #990000">+</span>debug_info <span style="color: #990000">+</span>warn_export_vars <span style="color: #990000">+</span>warn_shadow_vars <span style="color: #990000">+</span>warn_obsolete_guard</tt></pre></div></div>
+<div class="content"></div></div>
<div class="paragraph"><p>In other words: warnings as errors, debug info (recommended) and
enable warnings for exported variables, shadow variables and
obsolete guard functions.</p></div>
<div class="paragraph"><p>You can redefine this variable in your Makefile to change it
completely, either before or after including Erlang.mk:</p></div>
<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="color: #009900">ERLC_OPTS =</span> <span style="color: #990000">+</span>debug_info</tt></pre></div></div>
+<div class="content"></div></div>
<div class="paragraph"><p>You can also filter out some options from the defaults Erlang.mk
sets, by defining ERLC_OPTS after including Erlang.mk using the
<code>:=</code> operator.</p></div>
<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>include erlang.mk
-
-<span style="color: #990000">ERLC_OPTS :=</span> <span style="color: #009900">$(</span>filter-out -Werror<span style="color: #990000">,</span><span style="color: #009900">$(ERLC_OPTS))</span></tt></pre></div></div>
+<div class="content"></div></div>
</div>
<div class="sect3">
<h4 id="_erlc_exclude">ERLC_EXCLUDE</h4>
@@ -581,11 +565,7 @@ not normally need it.</p></div>
<div class="paragraph"><p>To exclude a module, simply list it in the variable, either
before or after including Erlang.mk:</p></div>
<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="color: #009900">ERLC_EXCLUDE =</span> cowboy_http2</tt></pre></div></div>
+<div class="content"></div></div>
</div>
</div>
</div>
@@ -631,11 +611,7 @@ when you have behaviors used by other modules in your project.</p></div
the dependency tracking file every time you compile. You can
do this by adding the following line to your <em>Makefile</em>:</p></div>
<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>NO_MAKEDEP <span style="color: #990000">?=</span> <span style="color: #993399">1</span></tt></pre></div></div>
+<div class="content"></div></div>
<div class="paragraph"><p>As you can see, the snippet above uses <code>?=</code> instead of a
simple equal sign. This is to allow you to temporarily override
this value when you do make substantial changes to your project
@@ -665,18 +641,7 @@ file is generated. To do this, you would add your hook before
or after including the <em>erlang.mk</em> file.</p></div>
<div class="paragraph"><p>The easiest way is after:</p></div>
<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="color: #009900">PROJECT =</span> example
-
-include erlang.mk
-
-<span style="color: #009900">$(PROJECT)</span>.d<span style="color: #990000">::</span> src/generated_mod.erl
-
-src/generated_mod.erl<span style="color: #990000">::</span> gen-mod.sh
- <span style="color: #009900">$(gen_verbose)</span> <span style="color: #990000">.</span>/gen-mod.sh <span style="color: #009900">$@</span></tt></pre></div></div>
+<div class="content"></div></div>
<div class="paragraph"><p>In this case we use <code>$(gen_verbose)</code> to hide the details of
the build by default. Erlang.mk will simply say what file
is it currently generating.</p></div>
@@ -688,20 +653,7 @@ modified.</p></div>
Erlang.mk, don’t forget to set the <code>.DEFAULT_GOAL</code> variable,
otherwise nothing will get built:</p></div>
<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="color: #009900">PROJECT =</span> example
-
-.DEFAULT_GOAL <span style="color: #990000">=</span> all
-
-<span style="color: #009900">$(PROJECT)</span>.d<span style="color: #990000">::</span> src/generated_mod.erl
-
-include erlang.mk
-
-src/generated_mod.erl<span style="color: #990000">::</span> gen-mod.sh
- <span style="color: #009900">$(gen_verbose)</span> <span style="color: #990000">.</span>/gen-mod.sh <span style="color: #009900">$@</span></tt></pre></div></div>
+<div class="content"></div></div>
</div>
</div>
<div class="sect1">
@@ -778,11 +730,7 @@ options. Options are documented in the
<a href="http://www.erlang.org/doc/apps/common_test/run_test_chapter.html">Common Test user guide</a>.
You can use it to set Common Test hooks, for example:</p></div>
<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="color: #009900">CT_OPTS =</span> -ct_hooks cowboy_ct_hook</tt></pre></div></div>
+<div class="content"></div></div>
<div class="paragraph"><p>The <code>CT_SUITES</code> variable can be used to override what
Common Test suites Erlang.mk will be aware of. It does
not normally need to be set as Erlang.mk will find the
@@ -791,11 +739,7 @@ test suites automatically.</p></div>
If the file is named <em>http_SUITE.erl</em>, the test suite
is <code>http</code>:</p></div>
<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="color: #009900">CT_SUITES =</span> http ws</tt></pre></div></div>
+<div class="content"></div></div>
</div>
</div>
<div class="sect1">
@@ -935,11 +879,7 @@ issues.</p></div>
your application, by making it a dependency of the <code>app</code>
target:</p></div>
<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="color: #990000">app::</span> rebar.config</tt></pre></div></div>
+<div class="content"></div></div>
<div class="paragraph"><p>Don’t forget to commit the file when it changes!</p></div>
<div class="paragraph"><p>If you run into other issues, it’s probably because you use a
feature specific to Erlang.mk, like the <code>cp</code> fetch method.
@@ -1472,14 +1412,11 @@ the related documentation.</p></div>
<a href="getting_started/">Getting started</a>
</p>
</li>
+</ul></div>
+<div class="ulist"><ul>
<li>
<p>
-<a href="overview/">Request overview</a>
-</p>
-</li>
-<li>
-<p>
-<a href="erlang_beginners/">Erlang for beginners</a>
+<a href="flow_diagram/">Flow diagram</a>
</p>
</li>
</ul></div>
@@ -1491,24 +1428,29 @@ the related documentation.</p></div>
<div class="ulist"><ul>
<li>
<p>
-<a href="routing/">routing</a>
+<a href="listeners/">Listeners</a>
</p>
</li>
<li>
<p>
-<a href="constraints/">Constraints</a>
+<a href="streams/">Streams</a>
</p>
</li>
<li>
<p>
-<a href="static_files/">Static files</a>
+<a href="routing/">Routing</a>
+</p>
+</li>
+<li>
+<p>
+<a href="constraints/">Constraints</a>
</p>
</li>
</ul></div>
</div>
</div>
<div class="sect1">
-<h2 id="_request_and_response">Request and response</h2>
+<h2 id="_handlers">Handlers</h2>
<div class="sectionbody">
<div class="ulist"><ul>
<li>
@@ -1523,7 +1465,19 @@ the related documentation.</p></div>
</li>
<li>
<p>
-<a href="req/">The Req object</a>
+<a href="static_files/">Static files</a>
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_request_and_response">Request and response</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+<a href="req/">Request details</a>
</p>
</li>
<li>
@@ -1602,6 +1556,8 @@ the related documentation.</p></div>
<a href="architecture/">Architecture</a>
</p>
</li>
+</ul></div>
+<div class="ulist"><ul>
<li>
<p>
<a href="broken_clients/">Dealing with broken clients</a>
@@ -1617,6 +1573,8 @@ the related documentation.</p></div>
<a href="sub_protocols/">Sub protocols</a>
</p>
</li>
+</ul></div>
+<div class="ulist"><ul>
<li>
<p>
<a href="hooks/">Hooks</a>