I've never used ring.middleware.reload, but I do run client figwheel and
server in the same jvm.
In your project.clj, make figwheel listen on an nrepl port:
:figwheel
{:nrepl-port 7888
:server-port 3000 ; http
:repl false ; Optional: keep this off and bootstrap to cljs
repl: see below.
:ring-handler your-ring-handler}
Connect to that port with an nrepl client: this will be a clj repl for the
server.
To get the cljs repl, you can either leave :repl true and use it from
stdin/stdout, or you can piggieback to a cljs repl like so:
(do (use 'figwheel-sidecar.repl-api) (cljs-repl))
Since you can connect multiple nrepl clients to the same nrepl server, you
can easily have one client for the server clj and another for the client
cljs/figwheel.
On Thursday, April 30, 2015 at 5:06:13 AM UTC-5, Dan Kersten wrote:
>
> Hi,
>
> I've got a clojure(script) project where I use figwheel to live-reload
> cljs and this works great, but I'm now trying to set up live reloading of
> the server-side clojure too.
> Since I don't want to run multiple jvm/lein instances, I'm using figwheels
> :ring-handler feature to add my server ring handler into figwheels embedded
> webserver.
> In the past, I've live-reloaded my server code using the reloaded
> workflow, but since figwheel gives me a cljs repl and not a clj repl, I
> don't know how to do that without running the server independently.
>
> So, instead I'm just trying to get ring.middleware.reload working, but its
> not picking up file changes.
>
> Has anyone got this working? Alternatively, does anyone have any tips on
> getting a nice workflow without running multiple jvm/lein instances?
>
> Thanks!
>
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.