kittoframework/kitto

Kitto.root not considered for serving assets

chrta opened this issue · 3 comments

chrta commented

I would like to use kitto (current master branch because of Kitto.root) in an umbrella project.

In my top level config.exs i already set:

config :kitto, root: Path.dirname(__DIR__) <> "/apps/kitto_dashboard", port: 4002

But when starting the umbrella project with

MIX_ENV=prod mix run --no-halt

I do not see the dashboard, since no assets are loaded. The dashboard itself is found.

Possible root cause

I think the problem is that Kitto.root is not considered here:
https://github.com/kittoframework/kitto/blob/master/lib/kitto/router.ex#L12

Workaround

As a workaround creating a symbolic link on the top level umbrella project fixes the issue:

ln -s apps/kitto_dashboard/public public

Thanks for reporting this issue. Kitto hasn't been tested in umbrella projects and it seems like you hit a bug. Are you willing to submit a PR for this? Seems like an easy fix.

chrta commented

Ok, i will try to fix it

Resolved by #53.

@chrta Can you share more details about your experience using Kitto in an umbrella project?
Did it take anything else to make it work?