summaryrefslogtreecommitdiffstats
path: root/docs/en/cowboy/2.0/guide/routing.asciidoc
diff options
context:
space:
mode:
Diffstat (limited to 'docs/en/cowboy/2.0/guide/routing.asciidoc')
-rw-r--r--docs/en/cowboy/2.0/guide/routing.asciidoc3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/en/cowboy/2.0/guide/routing.asciidoc b/docs/en/cowboy/2.0/guide/routing.asciidoc
index 2d8a1f27..47ef3c57 100644
--- a/docs/en/cowboy/2.0/guide/routing.asciidoc
+++ b/docs/en/cowboy/2.0/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.