Fork me on GitHub
#lein-figwheel
<
2016-03-21
>
bauerpauer14:03:50

Hi @bhauman, do you have a few minutes to talk about PR#360 on lein-figwheel? (`:server-opts` for http-kit)

bauerpauer14:03:58

Sweet. You mentioned in your comment that I'd have to create my own server, which is fine with me, but it's not abundantly clear how I'd go about injecting my own server into the lein figwheel dev process.

bhauman14:03:40

hmmm so for newcomers I would look at lein ring

bhauman14:03:17

and I think there is a ring refresh middleware

bhauman14:03:41

but laso just firing off a script with lein run works really well

bhauman14:03:27

so this will be your server, and then you will run lein figwheel in parallel

bauerpauer14:03:37

Ahh, So, separate JVM's, one of them running the figwheel server, and another serving the app?

bhauman14:03:08

yes thats if you don't write ascript that launches them in the same process

bhauman14:03:21

its definitely the way to go

bhauman14:03:43

I often write quick servers in ruby

bhauman14:03:02

if I'm just shuttling data

bauerpauer14:03:57

OK, cool. Didn't even think of running separate servers... Thanks, I'll give it a shot!

bhauman14:03:44

the main take away here is that the figwheel communication connection is a websocket that by default runs at localhost:3449 and your clojurescript/figwheel client code will automatically connect to it

bhauman14:03:48

regardless of where its served from

bauerpauer14:03:29

For sure. This whole workflow is so new to me that it's tough to see the obvious sometimes 😉

bhauman14:03:14

I need to write a FAQ as this is the number one place where a lot of folks get tripped up

bauerpauer14:03:20

Sounds good. I just recently started with Clojure/script + Figwheel, so I'll shoot over some of the things that I ran into if I can ever get out from under all of these projects...

zilvinasu23:03:34

Is it sort of normal to keep :figwheel cfgs in your project definition ?

zilvinasu23:03:47

I am kinda curious, how do people structure their production apps