Browse Source

Fix a confusing code snippet

Reported by Jordan Chaitin.
Loïc Hoguin 8 years ago
parent
commit
47eaadb209
1 changed files with 2 additions and 1 deletions
  1. 2 1
      doc/src/guide/routing.asciidoc

+ 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:
 by the listener:
 
 
 [source,erlang]
 [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.
 Note that you need to compile the routes again before updating.