figwheel

general discussion about figwheel, specific discussions in #figwheel-main and #lein-figwheel
llsouder 2018-10-18T00:18:35.000100Z

@solussd this worked for me: https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL maybe its not appropriate, what is a figwheel.main?

2018-10-18T00:23:26.000100Z

thanks, but I’m using clojure deps (cli tools)

bhauman 2018-10-18T00:40:17.000100Z

@solussd https://figwheel.org/docs/scripting_api.html

bhauman 2018-10-18T00:40:49.000100Z

then there is a bunch of editor integration stuff as well starting here https://figwheel.org/docs/editor-integration.html

2018-10-18T00:45:19.000100Z

@bhauman I just figured out what I was doing wrong. 🙂

2018-10-18T00:46:22.000100Z

I’m now starting an nrepl in my user.clj w/ the piggieback middleware and calling figwheel.main.api/start w/ “dev” to get my cljs repl running in Cursive. Works great now– I can evaluate clojurescript line by line.

llsouder 2018-10-18T01:05:18.000100Z

cider works using the template lein new figwheel testfig -- --reagent and no changes. What is the

;; for CIDER
        ;; :plugins [[cider/cider-nrepl "0.12.0"]]
used for?

dpsutton 2018-10-18T02:09:40.000100Z

antiquated and not needed. CIDER used to need to have its dependencies in place in the project. it now injects them. That release was at clojure/west in seattle on AuthorDate: Sat Apr 16 13:39:19 2016 -0700. That sounds like the template might be old 🙂

✔️ 1
2018-10-18T11:19:37.000100Z

I'm working on a small app using accountant/bidi for routing/browser URLs and I'd like to have the development server always serve up the index.html at any URL. Should I try to configure Figwheel to do this, or am I stepping outside of it's use case?

2018-10-18T11:20:38.000100Z

eg. http://localhost:3449/ and http://localhost:3449/something-else/ should both serve up my index.html

bhauman 2018-10-18T11:22:03.000100Z

@ben735 you will want to have a ring handler handle these specific routes and return the index.html

bhauman 2018-10-18T11:22:35.000200Z

you can configure a :ring-handler in your :figwheel configuration

2018-10-18T11:24:05.000100Z

@bhauman thanks, so maybe I make that handler read the index.html file and serve up the contents?

2018-10-18T11:24:16.000100Z

great, thanks

bhauman 2018-10-18T11:24:32.000100Z

keep in mind that page is for figwheel-main

bhauman 2018-10-18T11:24:55.000100Z

but the ring handler example is correct

2018-10-18T11:25:37.000100Z

figwheel-main as distinct from figwheel-sidecar?

bhauman 2018-10-18T11:26:40.000100Z

yes figwheel-main is different

2018-10-18T11:26:56.000100Z

thanks

2018-10-18T13:06:39.000100Z

I'm missing something with adding a :ring-handler to figwheel-sidecar. I've set :ring-handler be-scheduler.server/handler and created the file at ,src/be_scheduler/server.clj but I'm getting a java.lang.ClassNotFoundException: be-scheduler.server.

2018-10-18T13:07:59.000100Z

ClojureScript files are being found under src, but maybe I need to do something with this .clj?