I have a pre-compiled ember.js app (which fronted-js-framework shouldn\'t matter here), which basically consists of a folder with a index.html file, and a few js/css assets.
I think easiest way to replace web/templates/layout/app.html.eex
with your index html and change assets path inside with <%= static_path(@conn, "/js/app.js") %>
helpers to grab your ember app js file from static folder.
Router part:
scope "/", Chat do
pipe_through :browser
get "/", PageController, :index
end
And inside action render conn
.
Your setup should just work. There is only one caveat: every time you change something in lib
, you must restart your application.
The only directory that is code reloaded on requests is web
. In fact, that's the only difference between lib
and web
directories. That's why you put long running processes and supervisor in lib
, because there is no need to code reload them, and everything else goes in web
.