Fork me on GitHub
#calva
<
2022-02-25
>
Stephen22:02:08

I am really struggeling to get Calva to connect to my app.... I am serving my javascript code from another webserver.... I have this in my shadow-cljs.edn

{:app {:target :browser
        :output-dir "../public/js"
        :asset-path "/js"
        :modules {:main {:entries []}}}}
The shadow-cljs watch app is working and when I navigate to the file where I server the main.js everything seems to work fine. When I save my source.cljs file, the code gets "hot-reloaded". But when I Calva jack in to my :app and select browser repl, it wants me to connect to localhost:9630 for the js execution environment. When I do, it also works, but when I insert
(js/alert "hello world")
the alert will then appear in that localhost:9630 tab and not, where my app is running. Any Ideas?

bringe02:02:00

What port is your app running on? If you try to instead connect to localhost:<app-port>, and run that code, what happens?

pez06:02:05

You should connect the :app build, not the browser-repl. The browser-repl is standalone. Also, on localhost:9630 you find the shadow-cljs console. That's where you'll find things you tap> for instance.

1
Stephen08:02:32

wow, thank you, that worked!!

🙏 1