This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-22
Channels
- # alda (2)
- # announcements (1)
- # babashka (32)
- # beginners (67)
- # calva (1)
- # cider (19)
- # clerk (11)
- # clj-commons (35)
- # clj-kondo (7)
- # cljsrn (2)
- # clojure (35)
- # clojure-europe (86)
- # clojure-nl (5)
- # clojure-norway (5)
- # clojure-russia (6)
- # clojurescript (16)
- # clr (21)
- # conjure (1)
- # core-async (10)
- # cryogen (1)
- # cursive (12)
- # data-science (1)
- # emacs (29)
- # events (4)
- # figwheel-main (2)
- # graalvm (9)
- # gratitude (7)
- # honeysql (4)
- # hugsql (3)
- # hyperfiddle (23)
- # jobs (1)
- # jobs-discuss (4)
- # joyride (9)
- # malli (2)
- # off-topic (81)
- # portal (7)
- # reagent (19)
- # reitit (1)
- # releases (4)
- # shadow-cljs (121)
- # xtdb (3)
UPDATE: never mind, found this link:
https://figwheel.org/docs/your_own_server.html
What if I'd like to actually handle the request to /
? Is it possble?
Here's a section in the docs I'm talking about: https://figwheel.org/docs/ring-handler.html#the-last-handler
> The function you specify in :ring-handler
will be the last handler in the Figwheel middleware chain. This means it will only be called if the request isn’t handled by other middleware.
> This can cause confusion if you have an index.html
file present and you are trying to respond to a request for the root path /
in your handler. In this case the Figwheel middleware will handle the root path returning the index.html
file before the request has a chance to make it to your handler.
Another question: how to send data from server to browser? Figwheel.sidecar server had a send-message function. UPDATE: is it not implemented yet? https://github.com/bhauman/figwheel-main/issues/54 Any hints on how to implement this? I would try and send a pr THE FINAL UPDATE: I figured it out, you run the following on the server:
(binding [cljs.repl/*repl-env* (figwheel.main.api/repl-env "dev")]
(figwheel.core/client-eval "hello_world.core.greet(\"Alejandro\")"))