Phoenix.CodeReloader
A plug and module to handle automatic code reloading.
For each request, Phoenix checks if any of the modules previously
compiled requires recompilation via __phoenix_recompile__?/0
and then
calls mix compile
for sources exclusive to the web
directory.
To avoid race conditions, all code reloads are funneled through a sequential call operation.
Summary
call(conn, opts) | API used by Plug to invoke the code reloader on every request |
init(opts) | API used by Plug to start the code reloader |
reload!() | Reloads code within the witin |
touch() | Touches sources that should be recompiled |
Functions
Specs:
- reload! :: :ok | :noop | {:error, binary}
Reloads code within the witin web
directory.