From 60291c687803fa72a922be8885cfa87a6979070e Mon Sep 17 00:00:00 2001 From: Ivan Lisenkov Date: Thu, 31 Jan 2013 00:41:14 +0400 Subject: Small routing guide fix Make cowboy_router:compile/1 return to be consistent with current implementation. --- guide/routing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guide/routing.md b/guide/routing.md index 9d5c5af..ebf34de 100644 --- a/guide/routing.md +++ b/guide/routing.md @@ -229,14 +229,14 @@ handler to run instead of having to parse the routes repeatedly. This can be done with a simple call to `cowboy_router:compile/1`. ``` erlang -{ok, Routes} = cowboy_router:compile([ +Dispatch = cowboy_router:compile([ %% {HostMatch, list({PathMatch, Handler, Opts})} {'_', [{'_', my_handler, []}]} ]), %% Name, NbAcceptors, TransOpts, ProtoOpts cowboy:start_http(my_http_listener, 100, [{port, 8080}], - [{env, [{routes, Routes}]}] + [{env, [{dispatch, Dispatch}]}] ). ``` -- cgit v1.2.3