Deploying the web app
Interact works with the following frontends:
- Juno - The hottest Julia IDE
- IJulia - Jupyter notebooks (and Jupyter Lab) for Julia
- Blink - An Electron wrapper you can use to make Desktop apps
- Mux - A web server framework
Jupyter notebook/lab and Juno
Simply use display
:
using Interact
ui = button()
display(ui)
Note that using Interact in Jupyter Lab requires installing an extension first:
cd(Pkg.dir("WebIO", "assets"))
;jupyter labextension install webio
;jupyter labextension enable webio/jupyterlab_entry
Electron window
To deploy the app as a standalone Electron window, one would use Blink.jl:
using Interact, Blink
w = Window()
body!(w, ui);
Browser
The app can also be served in a webpage:
using Interact, Mux
WebIO.webio_serve(page("/", req -> ui), rand(8000:9000)) # serve on a random port