diff options
author | Loïc Hoguin <[email protected]> | 2017-06-14 15:07:12 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2017-06-14 15:07:31 +0200 |
commit | 47eaadb209ae390d1371c6cb76b92b4322b9ea01 (patch) | |
tree | 519964b1e5eb9d1afd57628e13df980ff3c1fa96 /doc/src/guide/routing.asciidoc | |
parent | ec00e3d60e985e00c6b425434af5017c634801db (diff) | |
download | cowboy-47eaadb209ae390d1371c6cb76b92b4322b9ea01.tar.gz cowboy-47eaadb209ae390d1371c6cb76b92b4322b9ea01.tar.bz2 cowboy-47eaadb209ae390d1371c6cb76b92b4322b9ea01.zip |
Fix a confusing code snippet
Reported by Jordan Chaitin.
Diffstat (limited to 'doc/src/guide/routing.asciidoc')
-rw-r--r-- | doc/src/guide/routing.asciidoc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/src/guide/routing.asciidoc b/doc/src/guide/routing.asciidoc index 2d8a1f2..47ef3c5 100644 --- a/doc/src/guide/routing.asciidoc +++ b/doc/src/guide/routing.asciidoc @@ -216,6 +216,7 @@ list used by routing. This will apply to all new connections accepted by the listener: [source,erlang] -cowboy:set_env(my_http_listener, dispatch, cowboy_router:compile(Dispatch)). +Dispatch = cowboy_router:compile(Routes), +cowboy:set_env(my_http_listener, dispatch, Dispatch). Note that you need to compile the routes again before updating. |