lein-figwheel

Aron 2016-11-27T17:40:55.000174Z

do i have to restart figwheel if i change the project.clj file?

Aron 2016-11-27T17:41:32.000175Z

anyway, i don't get why I see Figwheel Server: Resource not found just doing what's in the quick start

Aron 2016-11-27T17:44:19.000176Z

and when i google for it, there is nothing

kauko 2016-11-27T19:56:46.000177Z

@ashnur is this your first clojurescript project? Could you try setting up a project using a leiningen template, and see if that starts up correctly?

Aron 2016-11-27T20:10:54.000178Z

@kauko yes. first one, I am following this: https://github.com/bhauman/lein-figwheel/wiki/Quick-Start and it gives me errors from the start

Aron 2016-11-27T20:11:35.000180Z

figwheel has to work because other stuff worked before, like https://github.com/phosphene/d3-figwheel-demo

bhauman 2016-11-27T20:12:36.000182Z

The quick start says load from the file system right?

bhauman 2016-11-27T20:13:28.000183Z

@ashnur: ^

Aron 2016-11-27T20:14:38.000184Z

I don't know what do you mean by that, I don't remember

bhauman 2016-11-27T20:15:38.000185Z

The URL in your browser is file:// ...

Aron 2016-11-27T20:15:46.000186Z

definitely is not

Aron 2016-11-27T20:16:33.000187Z

right, i found the part you mention, i did miss this, i can't even do it, i am working through ssh, who thought this will be a good idea

Aron 2016-11-27T20:16:34.000188Z

eh

bhauman 2016-11-27T20:16:42.000189Z

Well that's how the quick start says to load index.html

Aron 2016-11-27T20:16:53.000190Z

every time i try clojure, there are a gazzilion little things that just tell me no, no, no, no

Aron 2016-11-27T20:17:23.000191Z

right, so the quick start is unusable for me

bhauman 2016-11-27T20:17:30.000192Z

The quick start doesn't assume that you will be working through ssh

bhauman 2016-11-27T20:17:53.000193Z

Why would the quick start assume that?

Aron 2016-11-27T20:19:12.000194Z

so, pls don't think this as if i expect figwheel to fir my needs, i don't. what i am saying is that there are only reasonable difficulties both in number and in nature that i can be expected to get over with when i am trying to learn something

Aron 2016-11-27T20:19:34.000195Z

if i were to do something i already know, configuration problems were ok. but having to deal with it from the start is hard

Aron 2016-11-27T20:19:38.000196Z

then

Aron 2016-11-27T20:20:29.000197Z

i don't say it should assume that i work through ssh, it just shouldn't expect me to load the file through the file system, if it already has a live server in it. it makes no sense.

bhauman 2016-11-27T20:23:07.000198Z

Let's solve the immediate problem

bhauman 2016-11-27T20:23:38.000200Z

Launch a static server at the root of the project

bhauman 2016-11-27T20:24:07.000201Z

Python -m SimpleHTTPServer 8000

Aron 2016-11-27T20:25:43.000202Z

ok, that was python2, but it works 🙂

bhauman 2016-11-27T20:27:08.000203Z

https://gist.github.com/willurd/5720255 for more

Aron 2016-11-27T20:27:47.000204Z

socket.cljs?rel=1480268448829:63 WebSocket connection to '<ws://localhost:3449/figwheel-ws/dev>' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

Aron 2016-11-27T20:27:55.000205Z

that's a very good gist, thanks

Aron 2016-11-27T20:28:36.000206Z

that localhost has to be an ip

bhauman 2016-11-27T20:28:42.000207Z

Ok now we have to edit the config

Aron 2016-11-27T20:28:52.000208Z

project.clj?

bhauman 2016-11-27T20:29:16.000209Z

Yep

Aron 2016-11-27T20:30:03.000210Z

where is the reference for what i can use there?

bhauman 2016-11-27T20:30:09.000211Z

Change :figwheel true

bhauman 2016-11-27T20:30:50.000212Z

To :figwheel {:websocket-host your up}

bhauman 2016-11-27T20:31:22.000213Z

It's in the readme under client config

Aron 2016-11-27T20:33:24.000214Z

I believe you it's there 😄

Aron 2016-11-27T20:35:12.000215Z

so, i had to restart figwheel after config change

Aron 2016-11-27T20:35:28.000216Z

oh, actually, it's still not working

Aron 2016-11-27T20:35:48.000217Z

still says localhost

bhauman 2016-11-27T20:36:34.000218Z

Ok probably cached

bhauman 2016-11-27T20:37:12.000219Z

Shift reload?

Aron 2016-11-27T20:37:45.000221Z

I have disabled cache when I have developer tools open

Aron 2016-11-27T20:37:48.000222Z

so i doubt

bhauman 2016-11-27T20:38:03.000223Z

It can still happen and does

Aron 2016-11-27T20:38:11.000224Z

yeah, of course you were right

Aron 2016-11-27T20:38:15.000225Z

why does this happen?

Aron 2016-11-27T20:38:38.000226Z

Figwheel: socket connection established

Aron 2016-11-27T20:40:07.000227Z

are you typing from a phone?

bhauman 2016-11-27T20:40:11.000228Z

Ok now here's the big lesson, you can run your own server and application anyway you like and can still connect to figwheel

bhauman 2016-11-27T20:40:16.000229Z

Yeah no fun

Aron 2016-11-27T20:40:31.000230Z

yeah, look, sorry to do this to you. it can totally wait

Aron 2016-11-27T20:40:54.000231Z

it could wait, because my first question you of course solved now

Aron 2016-11-27T20:41:27.000232Z

and yeah, i know that clojurescript is this dreamland where nothing is really set in stone unless basically there was no one yet to explore it

Aron 2016-11-27T20:41:31.000233Z

just hard to get there 😄