mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 12:40:25 +00:00
Convert the web_server example to a release
Temporary mimetypes list here too.
This commit is contained in:
parent
8bb7c180ff
commit
6a90d00cee
8 changed files with 37 additions and 50 deletions
|
@ -16,7 +16,12 @@ start(_Type, _Args) ->
|
|||
{"/[...]", cowboy_static, [
|
||||
{directory, {priv_dir, web_server, []}},
|
||||
{dir_handler, directory_handler},
|
||||
{mimetypes, {fun mimetypes:path_to_mimes/2, default}}
|
||||
{mimetypes, [
|
||||
{<<".html">>, [<<"text/html">>]},
|
||||
{<<".txt">>, [<<"text/plain">>]},
|
||||
{<<".mp4">>, [<<"video/mp4">>]},
|
||||
{<<".ogv">>, [<<"video/ogg">>]}
|
||||
]}
|
||||
]}
|
||||
]}
|
||||
]),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue