aboutsummaryrefslogtreecommitdiffstats
path: root/examples/static_world/src/static_world_app.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-09-09 15:51:41 +0200
committerLoïc Hoguin <[email protected]>2013-09-09 15:51:41 +0200
commit28f90b81fa25ebba578bc1b449ddf66d1a82ea3e (patch)
treec46e6860cbebd73fa4dbff0551409585d3bcff73 /examples/static_world/src/static_world_app.erl
parent24a22fa657af8398c963889d0bf08a904c96ec8c (diff)
downloadcowboy-28f90b81fa25ebba578bc1b449ddf66d1a82ea3e.tar.gz
cowboy-28f90b81fa25ebba578bc1b449ddf66d1a82ea3e.tar.bz2
cowboy-28f90b81fa25ebba578bc1b449ddf66d1a82ea3e.zip
Convert the static handler example to a release
Temporarily hardcode the list of mimetypes.
Diffstat (limited to 'examples/static_world/src/static_world_app.erl')
-rw-r--r--examples/static_world/src/static_world_app.erl7
1 files changed, 6 insertions, 1 deletions
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">>]}
+ ]}
]}
]}
]),