Fork me on GitHub
#figwheel-main
<
2023-02-22
>
Loic02:02:21

@fenno Is it necessary for you to start the server separately? You can provide a https://figwheel.org/docs/ring-handler.html to figwheel-main.edn so figwheel embed a server for you which is very convenient. Also I notice on your error resources\public\public which looks odd, is your path correct?

Tom Fenton10:02:55

Hi @loic, thanks for pointing out the public\public - now corrected! I’ve tried :ring-handler; my only middleware is wrap-defaults. Keeping secure-site-defaults gives ERR_SSL_PROTOCOL_ERROR; downgrading to site-defaults allows the page to load, but then Sente (the library I’m using for websocket comms) fails to connect. https://figwheel.org/docs/your_own_server suggests it’s easy to outgrow :ring-handler, so I’d assumed this was a limitation and that it was time to run a server alongside figwheel-main, but the doc doesn’t provide a lot of detail on how to do so. I think I’m close to the solution as client-server communication works via both Sente and figwheel-main when I run the two separate servers; the only issue I have seems to be the wrap-resource inside of wrap-defaults seems to have exclusive access to the files figwheel-main is trying to rebuild. Of course, I’m open to having misinterpreted everything and being in a coincidentally-nearly-working situation that will never quite fly ☺️

Jan K13:02:13

I don't know what could be the problem, but if it helps you can check out my own project that runs figwheel (dev-only) and sente with a separate http-kit server and everything works fine: https://gitlab.com/jan_k/quakelist

Tom Fenton13:02:53

Interesting - it looks like the issue might be specific to the way aleph manages resources, as when I switch out to http-kit as in your example it works for me as well. I'll delve further into it but at least I have more knowledge/a workaround for now. Much appreciated :)

👍 2
Matthew Davidson (kingmob)05:03:28

This is weird, because Aleph really does nothing with resources whatsoever.