I want to use ckeditor in my phoenix project.
If I place ckeditor files in /web/static/assets/ckeditor, the ckeditor folder gets copied to /priv/static, but if I access the file at http://localhost:4000/ckeditor/ckeditor.js it shows me a
no route found for GET /ckeditor/ckeditor.js
However, if I move the whole of ckeditor folder underneath a folder of the standard name (js, css, image) then it gets served.
The static assets documentation http://www.phoenixframework.org/docs/static-assets suggested that anything placed there would be copied over and served. But seems like only js/css/image/font folders are getting served, not any custom named folder.
How can I have these files be served?
Take a look at the Plug.Static config in lib/YOUR_APP/endpoint.ex
Here's the default:
plug Plug.Static,
at: "/"
only: ~w(css fonts images js sitemaps favicon.ico robots.txt)
You can add additional folders to the only
list and they'll be served as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With