The main script is loaded from
http://localhost:4000/js/qssite/source/script/qssite.js and it starts requiring supplementary scripts from
http://localhost:4000/script/qssite.a1b55c5841e0.js and resources like icons from
http://localhost:4000/qooxdoo/framework/source/resource/qx/decoration/Modern/window-captionbar-buttons-combined.png which are saluted with a big red
After some trial and error I came to this solution. In the file endpoint.ex, under the
plug Plug.Static ... call I added these lines
And now it works.
Given that this piece of code is needed only while I develop the application and should be excluded in production
- Is my call to
:dev == Mix.env()appropriate or should I check some other condition?
- Is there any better alternative than adding it to endpoint.ex? I know I could do something with router.ex but it doesn’t seem that clean to me. Can I do it even cleaner than what I already have?