diff options
Diffstat (limited to 'examples/static/src/static_app.erl')
-rw-r--r-- | examples/static/src/static_app.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/static/src/static_app.erl b/examples/static/src/static_app.erl index 16ef554..a2b9c31 100644 --- a/examples/static/src/static_app.erl +++ b/examples/static/src/static_app.erl @@ -11,16 +11,16 @@ %% 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}], [ - {dispatch, Dispatch} + {env, [{dispatch, Dispatch}]} ]), static_sup:start_link(). |