mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Add an index.html that is also served statically as the default for /
This commit is contained in:
parent
3d9078018d
commit
5b9bba9fe3
2 changed files with 2 additions and 0 deletions
1
examples/static_world/priv/index.html
Normal file
1
examples/static_world/priv/index.html
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<h1>Howdy, Pardner</h1>
|
|
@ -13,6 +13,7 @@
|
||||||
start(_Type, _Args) ->
|
start(_Type, _Args) ->
|
||||||
Dispatch = cowboy_router:compile([
|
Dispatch = cowboy_router:compile([
|
||||||
{'_', [
|
{'_', [
|
||||||
|
{"/", cowboy_static, {priv_file, static_world, "index.html"}},
|
||||||
{"/[...]", cowboy_static, {priv_dir, static_world, "",
|
{"/[...]", cowboy_static, {priv_dir, static_world, "",
|
||||||
[{mimetypes, cow_mimetypes, all}]}}
|
[{mimetypes, cow_mimetypes, all}]}}
|
||||||
]}
|
]}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue