AB
Size: a a a
AB
AU
AU
МЛ
ŹR
ŹR
МЛ
МЛ
def index(conn, _params) do
file =
case Application.get_env(:creo, :static_files) do
nil ->
Path.join([
:code.priv_dir(:creo),
"static",
"index.html"
])
static_files ->
Path.join(
static_files,
"index.html"
)
end
{:ok, binary} = File.read(file)
html(conn, binary)
end
МЛ
plug Plug.Static,
at: "/",
from: Application.compile_env(:creo, :static_files, :creo),
gzip: true,
only: ~w(css fonts images js favicon_16x16.png robots.txt)
МЛ
dev.exs
вот такая строчка: config :creo, static_files: "../frontend/dist"
МЛ
МЛ
МЛ
МЛ
МЛ
МЛ
ŹR
ŹR
МЛ
ŹR