aboutsummaryrefslogtreecommitdiffstats
path: root/examples/static_world/src/static_world_app.erl
diff options
context:
space:
mode:
authorDavid N. Welton <[email protected]>2015-02-17 11:53:08 +0100
committerLoïc Hoguin <[email protected]>2015-05-06 11:50:11 +0300
commitf5c37a789c0394104c2fe69d27d6b131712432de (patch)
tree0b5054a7a24f1069df00b0e484b057a84e53df5b /examples/static_world/src/static_world_app.erl
parent21632944bb7051d3291faacf45861e648a47ca1a (diff)
downloadcowboy-f5c37a789c0394104c2fe69d27d6b131712432de.tar.gz
cowboy-f5c37a789c0394104c2fe69d27d6b131712432de.tar.bz2
cowboy-f5c37a789c0394104c2fe69d27d6b131712432de.zip
Add an index.html that is also served statically as the default for /
Diffstat (limited to 'examples/static_world/src/static_world_app.erl')
-rw-r--r--examples/static_world/src/static_world_app.erl1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/static_world/src/static_world_app.erl b/examples/static_world/src/static_world_app.erl
index f5ab1a9..4d194c7 100644
--- a/examples/static_world/src/static_world_app.erl
+++ b/examples/static_world/src/static_world_app.erl
@@ -13,6 +13,7 @@
start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
+ {"/", cowboy_static, {priv_file, static_world, "index.html"}},
{"/[...]", cowboy_static, {priv_dir, static_world, "",
[{mimetypes, cow_mimetypes, all}]}}
]}