Skip to content

Commit

Permalink
Make examples use the new routing
Browse files Browse the repository at this point in the history
  • Loading branch information
essen committed Jan 29, 2013
1 parent 638638a commit ab0699a
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 23 deletions.
6 changes: 3 additions & 3 deletions examples/chunked_hello_world/src/chunked_hello_world_app.erl
Expand Up @@ -11,11 +11,11 @@
%% API.

start(_Type, _Args) ->
Dispatch = [
Dispatch = cowboy_router:compile([
{'_', [
{[], toppage_handler, []}
{"/", toppage_handler, []}
]}
],
]),
{ok, _} = cowboy:start_http(http, 100, [{port, 8080}], [
{env, [{dispatch, Dispatch}]}
]),
Expand Down
6 changes: 3 additions & 3 deletions examples/compress_response/src/compress_response_app.erl
Expand Up @@ -11,11 +11,11 @@
%% API.

start(_Type, _Args) ->
Dispatch = [
Dispatch = cowboy_router:compile([
{'_', [
{[], toppage_handler, []}
{"/", toppage_handler, []}
]}
],
]),
{ok, _} = cowboy:start_http(http, 100, [{port, 8080}], [
{compress, true},
{env, [{dispatch, Dispatch}]}
Expand Down
4 changes: 2 additions & 2 deletions examples/cookie/src/cookie_app.erl
Expand Up @@ -11,11 +11,11 @@
%% API.

start(_Type, _Args) ->
Dispatch = [
Dispatch = cowboy_router:compile([
{'_', [
{'_', toppage_handler, []}
]}
],
]),
{ok, _} = cowboy:start_http(http, 100, [{port, 8080}], [
{env, [{dispatch, Dispatch}]}
]),
Expand Down
6 changes: 3 additions & 3 deletions examples/echo_get/src/echo_get_app.erl
Expand Up @@ -11,11 +11,11 @@
%% API.

start(_Type, _Args) ->
Dispatch = [
Dispatch = cowboy_router:compile([
{'_', [
{[], toppage_handler, []}
{"/", toppage_handler, []}
]}
],
]),
{ok, _} = cowboy:start_http(http, 100, [{port, 8080}], [
{env, [{dispatch, Dispatch}]}
]),
Expand Down
6 changes: 3 additions & 3 deletions examples/echo_post/src/echo_post_app.erl
Expand Up @@ -11,11 +11,11 @@
%% API.

start(_Type, _Args) ->
Dispatch = [
Dispatch = cowboy_router:compile([
{'_', [
{[], toppage_handler, []}
{"/", toppage_handler, []}
]}
],
]),
{ok, _} = cowboy:start_http(http, 100, [{port, 8080}], [
{env, [{dispatch, Dispatch}]}
]),
Expand Down
6 changes: 3 additions & 3 deletions examples/hello_world/src/hello_world_app.erl
Expand Up @@ -11,11 +11,11 @@
%% API.

start(_Type, _Args) ->
Dispatch = [
Dispatch = cowboy_router:compile([
{'_', [
{[], toppage_handler, []}
{"/", toppage_handler, []}
]}
],
]),
{ok, _} = cowboy:start_http(http, 100, [{port, 8080}], [
{env, [{dispatch, Dispatch}]}
]),
Expand Down
6 changes: 3 additions & 3 deletions examples/rest_hello_world/src/rest_hello_world_app.erl
Expand Up @@ -11,11 +11,11 @@
%% API.

start(_Type, _Args) ->
Dispatch = [
Dispatch = cowboy_router:compile([
{'_', [
{[], toppage_handler, []}
{"/", toppage_handler, []}
]}
],
]),
{ok, _} = cowboy:start_http(http, 100, [{port, 8080}], [
{env, [{dispatch, Dispatch}]}
]),
Expand Down
6 changes: 3 additions & 3 deletions examples/static/src/static_app.erl
Expand Up @@ -11,14 +11,14 @@
%% API.

start(_Type, _Args) ->
Dispatch = [
Dispatch = cowboy_router:compile([
{'_', [
{['...'], cowboy_static, [
{"/[...]", cowboy_static, [
{directory, {priv_dir, static, []}},
{mimetypes, {fun mimetypes:path_to_mimes/2, default}}
]}
]}
],
]),
{ok, _} = cowboy:start_http(http, 100, [{port, 8080}], [
{env, [{dispatch, Dispatch}]}
]),
Expand Down

0 comments on commit ab0699a

Please sign in to comment.