aboutsummaryrefslogtreecommitdiffstats
path: root/examples/static/src/static_app.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-01-29 14:47:17 +0100
committerLoïc Hoguin <[email protected]>2013-01-29 14:47:17 +0100
commitab0699ab29b6750d19cf2e0fce03e185d2206e9d (patch)
treee7be2893e989ca4dd85d90bea63098bbfcf96c9f /examples/static/src/static_app.erl
parent638638a841f22eacbebd827c0fb40002358bf1ac (diff)
downloadcowboy-ab0699ab29b6750d19cf2e0fce03e185d2206e9d.tar.gz
cowboy-ab0699ab29b6750d19cf2e0fce03e185d2206e9d.tar.bz2
cowboy-ab0699ab29b6750d19cf2e0fce03e185d2206e9d.zip
Make examples use the new routing
Diffstat (limited to 'examples/static/src/static_app.erl')
-rw-r--r--examples/static/src/static_app.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/static/src/static_app.erl b/examples/static/src/static_app.erl
index e147db9..a2b9c31 100644
--- a/examples/static/src/static_app.erl
+++ b/examples/static/src/static_app.erl
@@ -11,14 +11,14 @@
%% 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}], [
{env, [{dispatch, Dispatch}]}
]),