Phoenix is awesome.
A problem I ran into lately is how to add additional static paths to be served.
If you take a look in your lib/endpoint.ex
file, you’ll see the plug used for adding static paths:
1 2 3 |
|
I wanted to add another folder to be served, ‘zips’, that I had to edit the only:
line in the plug specification as such:
1 2 3 |
|
There you have it, now I can access the files in the zips
folder in priv/static/zips
through the URL. Cheers!