Skip to content

Instantly share code, notes, and snippets.

@paveltyk
Last active September 11, 2019 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paveltyk/5fb3d503ef24715c5f898f822646499f to your computer and use it in GitHub Desktop.
Save paveltyk/5fb3d503ef24715c5f898f822646499f to your computer and use it in GitHub Desktop.
# config/prod.exs - Remove cache_manifest
config :healthyskin, HealthyskinWeb.Endpoint, url: [host: "example.com", port: 80]
# lib/healthyskin_web/endpoint.ex - Instruct Plug.Static how to serve assets
plug Plug.Static,
at: "/",
from: "assets/build",
gzip: false,
only:
~w(index.html favicon.ico logo192.png logo512.png static service-worker.js manifest.json)
# lib/healthyskin_web/router.ex - Add catchall route for SPA
scope "/", HealthyskinWeb do
get("/*path", PageController, :index)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment