Serves index.html
pages for requests to paths without a filename in Phoenix / Plug applications.
- Add
plug_static_index_html
to your list of dependencies inmix.exs
:
```elixir
def deps do
[{:plug_static_index_html, "~> 1.0"}]
end
```
Add Plug.Static.IndexHtml
before Plug.Static
in endpoint.ex
plug Plug.Static.IndexHtml, at: "/docs"
plug Plug.Static, at: "/", from: :my_app
See docs at https://hexdocs.pm/plug_static_index_html
See LICENSE file for details