Skip to content
Serves `index.html` pages for requests to paths without a filename in Phoenix / Plug applications
Branch: master
Clone or download
Latest commit 1513cbb Aug 4, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Fix bug causing index.html to be added to all requests Jul 28, 2016
test Fix bug causing index.html to be added to all requests Jul 28, 2016
.gitignore Initial commit Jul 26, 2016
LICENSE Fix warnings when building with elixir 1.4 Jul 11, 2017
README.md Version 1.0.0 Aug 5, 2017
mix.exs Version 1.0.0 Aug 5, 2017
mix.lock Update hex package dependency versions Aug 5, 2017

README.md

PlugStaticIndexHtml

Serves index.html pages for requests to paths without a filename in Phoenix / Plug applications.

Installation

  1. Add plug_static_index_html to your list of dependencies in mix.exs:
```elixir
def deps do
  [{:plug_static_index_html, "~> 1.0"}]
end
```

Usage

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

License (MIT)

See LICENSE file for details

You can’t perform that action at this time.