score:2

Accepted answer

Such static files are usually stored in priv/static. One way to do this would be to put data.tsv in priv/static/data/data.tsv, and then adding data to the list of directories that Plug.Static should serve, by changing lib/my_app/endpoint.txt like this:

   plug Plug.Static,
     at: "/", from: :my_app, gzip: false,
-    only: ~w(css fonts images js favicon.ico robots.txt)
+    only: ~w(css fonts images js favicon.ico robots.txt data)

Related Query

More Query from same tag