Permalink
Browse files

Fix a confusing code snippet

Reported by Jordan Chaitin.
1 parent ec00e3d commit 47eaadb209ae390d1371c6cb76b92b4322b9ea01 @essen essen committed Jun 14, 2017
Showing with 2 additions and 1 deletion.
  1. +2 −1 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.

0 comments on commit 47eaadb

Please sign in to comment.