Skip to content

Code Reloading

Dimitrios Zorbas edited this page Mar 25, 2018 · 8 revisions

Kitto reloads code found under lib and jobs when you make changes in development.

For the code reloading to work you need to have installed a file watching backend according to your platform:

Starting you development server with mix kitto.server when you change a file, you should see in the console something like:

[info] Reloading job file: /home/projects/my-awesome-dashboard/jobs/gitlab.exs

Deleting a job file will stop any jobs defined in the file and creating a file will register and start included jobs.

If you see logging output like:

[error] backend port not found: :inotifywait

it means you have to install the appropriate backend for your OS (in this case inotify-tools).

Code reloading watches for changes only in development environment.

To disable it completely, add:

# File: config/config.exs

config :kitto, reload_code?: false

Assets are watched by webpack-dev-server, for configuration options, see: customize asset watcher.