Interact.jl live reload

Hi! I’m trying out Interact.jl and use Mux as they suggest for serving the web page:

ui = ...
WebIO.webio_serve("/", req -> ui), 8000)

What I don’t understand is how to get “live reload” or something similar? When I modify and reexecute the ui = ... line, obviously nothing changes, and the served web page stays the same. Running webio_serve again requires to stop the previous execution manually, otherwise the port is occupied.

1 Like

I’m running into the same problem. Any ideas out there?

Judging by the lack of answers I guess that live reload is currently not possible. But then I don’t really see how the development workflow goes for Interact.jl web apps - does it really requires manual restart after each code modification?

You could try Haven’t tested it with Interact.jl though.

1 Like

LiveServer might work here, basically you can trigger a modification by saving the script you work on which would trigger a page reload, you might want to consider a similar discussion for live reload with Weave which led to this PR; it should be possible to adapt it to your use case with Interact.
Note that I’ve not tried this and am not very familiar with Interact so there may be hidden difficulties.

Btw, some people may be interested in this recent discussion to get Interact to work well with Franklin (which itself relies upon LiveServer) to get a locally served app with live reload, it should be interesting :slight_smile: .

1 Like