aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/guide/routing.asciidoc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-08-24 17:25:33 +0200
committerLoïc Hoguin <[email protected]>2016-08-24 17:25:33 +0200
commit7839f1367194813c70d7e223a476f96a62b298ae (patch)
treed5f7be7d443c47dfc67856e9c10474232cb79686 /doc/src/guide/routing.asciidoc
parentb9ad02d3057e78ff82dacbd38042e33073c4bc75 (diff)
downloadcowboy-7839f1367194813c70d7e223a476f96a62b298ae.tar.gz
cowboy-7839f1367194813c70d7e223a476f96a62b298ae.tar.bz2
cowboy-7839f1367194813c70d7e223a476f96a62b298ae.zip
More 2.0 documentation updates
Still incomplete.
Diffstat (limited to 'doc/src/guide/routing.asciidoc')
-rw-r--r--doc/src/guide/routing.asciidoc10
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/src/guide/routing.asciidoc b/doc/src/guide/routing.asciidoc
index 150c634..864a19a 100644
--- a/doc/src/guide/routing.asciidoc
+++ b/doc/src/guide/routing.asciidoc
@@ -37,11 +37,11 @@ PathsList = [Path1, Path2, ... PathN].
Finally, each path contains matching rules for the path along with
optional constraints, and gives us the handler module to be used
-along with options that will be given to it on initialization.
+along with its initial state.
[source,erlang]
-Path1 = {PathMatch, Handler, Opts}.
-Path2 = {PathMatch, Constraints, Handler, Opts}.
+Path1 = {PathMatch, Handler, InitialState}.
+Path2 = {PathMatch, Constraints, Handler, InitialState}.
Continue reading to learn more about the match syntax and the optional
constraints.
@@ -199,8 +199,8 @@ This can be done with a simple call to `cowboy_router:compile/1`.
[source,erlang]
----
Dispatch = cowboy_router:compile([
- %% {HostMatch, list({PathMatch, Handler, Opts})}
- {'_', [{'_', my_handler, []}]}
+ %% {HostMatch, list({PathMatch, Handler, InitialState})}
+ {'_', [{'_', my_handler, #{}}]}
]),
%% Name, NbAcceptors, TransOpts, ProtoOpts
cowboy:start_clear(my_http_listener, 100,