I am trying to figure out how to configure Plug.Static without any other framework (Phoenix, Sugar, etc); just Cowboy, Plug and Elixir. I just don\'t know how t
Everything that José Valim said. And here's a most simple example to add to it:
defmodule Server do
use Plug.Builder
plug Plug.Logger
plug Plug.Static, at: "/", from: "/path/to/static"
end
This will serve all static files in "/path/to/static" at the "/" endpoint.
Have a look at the docs for more options and a deeper explanation.