diff options
author | David N. Welton <[email protected]> | 2015-02-17 11:53:08 +0100 |
---|---|---|
committer | David N. Welton <[email protected]> | 2015-02-17 11:53:08 +0100 |
commit | 5b9bba9fe334a3988ebfa609460e2be3c6d80be8 (patch) | |
tree | f8812a6eebc745b7508f1b89b606e0873b6d87f6 | |
parent | 3d9078018d7f0a83a359b70c698d35e35fbb94f9 (diff) | |
download | cowboy-5b9bba9fe334a3988ebfa609460e2be3c6d80be8.tar.gz cowboy-5b9bba9fe334a3988ebfa609460e2be3c6d80be8.tar.bz2 cowboy-5b9bba9fe334a3988ebfa609460e2be3c6d80be8.zip |
Add an index.html that is also served statically as the default for /
-rw-r--r-- | examples/static_world/priv/index.html | 1 | ||||
-rw-r--r-- | examples/static_world/src/static_world_app.erl | 1 |
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}]}} ]} |