Basic Bonito app fails to be served

I’m trying to get a very simple Bonito (v4.0.0) app running, and I must be doing something horribly wrong because it’s not working well. Starting from Deployment · Bonito (simondanisch.github.io)

using Bonito, Bonito.Observables
import Bonito.TailwindDashboard as D

app = App(DOM.div(D.Slider("nsamples", 1:200, value=100)), title="hello world")

port = 9384
url = "0.0.0.0"
server = Bonito.Server(app, url, port)

On http://localhost:9384, it works alright:

but when I put in my own IP, as in http://MY_IP_ADDRESS:9384, it looks different, and the interactivity is broken (i.e. the nsamples number does not change when I move the slider)

Am I missing something?

Disclosure: I am behind a firewall, but I have a non-firewalled colleague (@etpinard) who confirmed the above.

I tried Genie, Oxygen, Mux (!) and Python’s Dash and they all have the same behaviour of loading a static page when accessed through MY_IP_ADDRESS:port. I’m going to blame the firewall unless new information comes to light.

Using the simple script from the original post, this

image

pops up in the devtools.

Looks like Bonito is trying to load something from localhost

1 Like