This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-22
Channels
- # aatree (2)
- # beginners (14)
- # boot (190)
- # cider (16)
- # cljs-dev (15)
- # cljsjs (6)
- # cljsrn (7)
- # clojure (101)
- # clojure-austin (26)
- # clojure-berlin (2)
- # clojure-estonia (4)
- # clojure-greece (53)
- # clojure-russia (46)
- # clojurescript (44)
- # core-async (12)
- # cursive (57)
- # data-science (49)
- # datomic (5)
- # emacs (8)
- # hoplon (92)
- # ldnclj (20)
- # lein-figwheel (22)
- # leiningen (4)
- # mount (37)
- # om (103)
- # onyx (26)
- # parinfer (70)
- # proton (6)
- # re-frame (32)
- # reagent (1)
- # yada (24)
When using Figwheel + Devcards at the same time as your own application HTTP server, does it matter if you serve static assets from your app's HTTP server or from Figwheel's embedded HTTP server?
I'm attempting to port the om-next-starter project (https://github.com/jdubie/om-next-starter) to use stuartsierra's component library following the example in https://github.com/bhauman/lein-figwheel#user-content-scripting-with-component . Here's a gist: https://gist.github.com/grzm/f0caa09e5b15500a4b89
Figwheel starts up on 3449, serving up the om app. The jetty-server starts up on 3000. And the om app get's 404's when fetching data from the server.
@grzm Which port are you visiting in your web browser?
Try visiting 3000 instead.
If your application is trying to fetch data from the server, it needs to get it from your application server, not Figwheel.
Which, interestingly, answers the question I just asked earlier.
Is your app server configured to serve static files out of resources/public
?
Running the server using just :figwheel-options {:ring-handler server/app}
works as expected. index.html, which loads the app, is in resources/public
, which I understand is the default for ring. There's no explicit config for resources/public in :app-server
. Should there be?
Depends on your web framework / routing library / etc.
okay, in that case I believe I do have that configured. It's using ring, and the handler includes (wrap-resource req "public")
middleware
You're welcome.