aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-02-12 14:06:54 +0100
committerLoïc Hoguin <[email protected]>2013-02-12 14:06:54 +0100
commitbce7b860ee925b61fe8aa14565301c3c4aa65de2 (patch)
tree6e72de813238f3c3115f6f387db62726ab65ad71 /src
parentbc743a3ea57516330eb5f5152e0f95a11b79ffd0 (diff)
parent6575ceb0dd41111604453095044e2f9296ac0eee (diff)
downloadcowboy-bce7b860ee925b61fe8aa14565301c3c4aa65de2.tar.gz
cowboy-bce7b860ee925b61fe8aa14565301c3c4aa65de2.tar.bz2
cowboy-bce7b860ee925b61fe8aa14565301c3c4aa65de2.zip
Merge branch 'static_doc' of git://github.com/acammack/cowboy
Diffstat (limited to 'src')
-rw-r--r--src/cowboy_static.erl22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/cowboy_static.erl b/src/cowboy_static.erl
index 373ea52..6e8ef40 100644
--- a/src/cowboy_static.erl
+++ b/src/cowboy_static.erl
@@ -44,15 +44,15 @@
%% ==== Examples ====
%% ```
%% %% Serve files from /var/www/ under http://example.com/static/
-%% {[<<"static">>, '...'], cowboy_static,
+%% {"/static/[...]", cowboy_static,
%% [{directory, "/var/www"}]}
%%
%% %% Serve files from the current working directory under http://example.com/static/
-%% {[<<"static">>, '...'], cowboy_static,
+%% {"/static/[...]", cowboy_static,
%% [{directory, <<"./">>}]}
%%
%% %% Serve files from cowboy/priv/www under http://example.com/
-%% {['...'], cowboy_static,
+%% {"/[...]", cowboy_static,
%% [{directory, {priv_dir, cowboy, [<<"www">>]}}]}
%% '''
%%
@@ -74,14 +74,14 @@
%% ==== Example ====
%% ```
%% %% Use a static list of content types.
-%% {[<<"static">>, '...'], cowboy_static,
+%% {"/static/[...]", cowboy_static,
%% [{directory, {priv_dir, cowboy, []}},
%% {mimetypes, [
%% {<<".css">>, [<<"text/css">>]},
%% {<<".js">>, [<<"application/javascript">>]}]}]}
%%
%% %% Use the default database in the mimetypes application.
-%% {[<<"static">>, '...'], cowboy_static,
+%% {"/static/[...]", cowboy_static,
%% [{directory, {priv_dir, cowboy, []}},
%% {mimetypes, {fun mimetypes:path_to_mimes/2, default}}]}
%% '''
@@ -110,17 +110,17 @@
%% ==== Examples ====
%% ```
%% %% A value of default is equal to not specifying the option.
-%% {[<<"static">>, '...'], cowboy_static,
+%% {"static/[...]", cowboy_static,
%% [{directory, {priv_dir, cowboy, []}},
%% {etag, default}]}
%%
%% %% Use all avaliable ETag function arguments to generate a header value.
-%% {[<<"static">>, '...'], cowboy_static,
+%% {"static/[...]", cowboy_static,
%% [{directory, {priv_dir, cowboy, []}},
%% {etag, {attributes, [filepath, filesize, inode, mtime]}}]}
%%
%% %% Use a user defined function to generate a strong ETag header value.
-%% {[<<"static">>, '...'], cowboy_static,
+%% {"static/[...]", cowboy_static,
%% [{directory, {priv_dir, cowboy, []}},
%% {etag, {fun generate_strong_etag/2, strong_etag_extra}}]}
%%
@@ -153,17 +153,17 @@
%%
%% ```
%% %% Serve cowboy/priv/www/index.html as http://example.com/
-%% {[], cowboy_static,
+%% {"/", cowboy_static,
%% [{directory, {priv_dir, cowboy, [<<"www">>]}}
%% {file, <<"index.html">>}]}
%%
%% %% Serve cowboy/priv/www/page.html under http://example.com/*/page
-%% {['_', <<"page">>], cowboy_static,
+%% {"/:_/page", cowboy_static,
%% [{directory, {priv_dir, cowboy, [<<"www">>]}}
%% {file, <<"page.html">>}]}.
%%
%% %% Always serve cowboy/priv/www/other.html under http://example.com/other
-%% {[<<"other">>, '...'], cowboy_static,
+%% {"/other/[...]", cowboy_static,
%% [{directory, {priv_dir, cowboy, [<<"www">>]}}
%% {file, "other.html"}]}
%% '''