Closed malfario closed 7 years ago
Thanks for reporting this, we'll likely change this back because the different ports are confusing people. In the meanwhile this should be removed from the README. I don't have time for it at the moment though but it would be great if someone could submit a PR.
What you can do as a workaround is put this in user.clj
(def figwheel-http-handler
(constantly {:status 301
:headers {"Location" "http://localhost:10555"}}))
And in project.clj
:figwheel {
;;;;; snip
:ring-handler user/figwheel-http-handler
}
If you really want to also serve up things through Figwheel you can set up a handler that reaches into reloaded.repl/system
and finds the current system's handler from there.
(defn figwheel-http-handler [req]
((get-in reloaded.repl/system [:handler :handler]) req))
Thank you so much, your last suggestion allows me to write clean cljs-ajax queries while being CORS friendly:
(GET "/tickets") vs (GET "http://localhost:10555/tickets")
Cheers!
Closed by 3a5a95c
Hi!
The README generated for my project with Chestnut 0.15.1 states:
However, Compojure routes defined in
project.routes/home-routes
are not accessible through Figwheel's server at localhost:3449, but through the Jetty instance running on localhost:10555.Is there a way to expose new routes through Figwheel's HTTP server?
Thanks in advance!