aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2015-05-06 11:50:19 +0300
committerLoïc Hoguin <[email protected]>2015-05-06 11:50:19 +0300
commite5170737d229a5b7bb6159d24ac10062fe8d6789 (patch)
tree232318cfe4d356fcccd203bad51a6b126f05b8a7
parent4fb2aacc8880236d456a85fe41f0363c02110ed5 (diff)
parent5b9bba9fe334a3988ebfa609460e2be3c6d80be8 (diff)
downloadcowboy-e5170737d229a5b7bb6159d24ac10062fe8d6789.tar.gz
cowboy-e5170737d229a5b7bb6159d24ac10062fe8d6789.tar.bz2
cowboy-e5170737d229a5b7bb6159d24ac10062fe8d6789.zip
Merge branch 'static_with_index' of https://github.com/davidw/cowboy into 1.0.x
-rw-r--r--examples/static_world/priv/index.html1
-rw-r--r--examples/static_world/src/static_world_app.erl1
2 files changed, 2 insertions, 0 deletions
diff --git a/examples/static_world/priv/index.html b/examples/static_world/priv/index.html
new file mode 100644
index 0000000..2ebe508
--- /dev/null
+++ b/examples/static_world/priv/index.html
@@ -0,0 +1 @@
+<h1>Howdy, Pardner</h1>
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}]}}
]}