Skip to content

Commit

Permalink
use cowboy_roter:routes constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Groshev committed Feb 28, 2013
1 parent 03366b3 commit e0853a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/hello_world/src/hello_world_app.erl
Expand Up @@ -11,11 +11,12 @@
%% API.

start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
Routes = cowboy_router:routes([
{'_', [
{"/", toppage_handler, []}
]}
]),
Dispatch = cowboy_router:compile(Routes),
{ok, _} = cowboy:start_http(http, 100, [{port, 8080}], [
{env, [{dispatch, Dispatch}]}
]),
Expand Down

0 comments on commit e0853a2

Please sign in to comment.