From 28f90b81fa25ebba578bc1b449ddf66d1a82ea3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 9 Sep 2013 15:51:41 +0200 Subject: Convert the static handler example to a release Temporarily hardcode the list of mimetypes. --- examples/static_world/src/static_world_app.erl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'examples/static_world/src/static_world_app.erl') diff --git a/examples/static_world/src/static_world_app.erl b/examples/static_world/src/static_world_app.erl index 6470f12..4cc0254 100644 --- a/examples/static_world/src/static_world_app.erl +++ b/examples/static_world/src/static_world_app.erl @@ -15,7 +15,12 @@ start(_Type, _Args) -> {'_', [ {"/[...]", cowboy_static, [ {directory, {priv_dir, static_world, []}}, - {mimetypes, {fun mimetypes:path_to_mimes/2, default}} + {mimetypes, [ + {<<".html">>, [<<"text/html">>]}, + {<<".txt">>, [<<"text/plain">>]}, + {<<".mp4">>, [<<"video/mp4">>]}, + {<<".ogv">>, [<<"video/ogg">>]} + ]} ]} ]} ]), -- cgit v1.2.3