hi everyone, i’m working on trying to get a compos...
# compose-web
j
hi everyone, i’m working on trying to get a compose/canvas project working. i’ve got a simple project that displays a hello world
Text
composable centered in a
Box
. running
./gradlew jsBrowserRun
works fine. it opens to localhost:8080 and displays what I expect. but i’m trying to figure out how to eventually embed this in a website. I thought that
./gradlew jsBrowserDistribution
was the command I wanted, and then I could open
foo/build/distributions/index.html
locally and I should see the same result. but right now i’m just getting an empty screen. i have a separate project that uses the compose/dom approach, and calling
./gradlew jsBrowserDistribution
and navigating to
foo/build/distributions/index.html
works fine. Is there a step I’m missing for the compose/canvas approach?
ok I checked the web console. seems this is a web assembly thing i don’t understand. but i guess it should work for a traditional web server. https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why[…]s-my-program-stall-in-downloading-or-preparing
m
It does work by just uploading the generated distribution files to a normal web server. You can find an example I created here: https://www.mpmediasoft.de/test/PolySpiralMpp/
j
awesome thank you 🙏