Skip to content

mbuhot/plug_static_index_html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages