Fork me on GitHub
Endre Bakken Stovner12:01:39

Experienced scientific programmer, but web-noob here. I want to create a same machine backend + frontend app in clj/cljs. I am using luminus with +re-frame +shadow-cljs. What is the best way (easy, fast enough) to send messages between the front-end and back-end? http-requests?

Janne Sauvala13:01:40

Yes, http-requests are the way to go ๐Ÿ™‚

Endre Bakken Stovner13:01:49

But I cannot wrap my head around how to do it XD I just asked in the re-frame forum also.

Endre Bakken Stovner13:01:56

Thanks for replying btw ๐Ÿ™‚

Janne Sauvala14:01:00

Start is always hard. I was googling around some nice example app. Here is atleast some docs about how re-frame talks to servers

Janne Sauvala14:01:45

This might be helpful code-wise (i havent tested it but saw this in some comments)

Janne Sauvala14:01:21

I havenโ€™t used that library but I have also heard people recommending it. I thought that is for to use websockets but I might be wrong ๐Ÿ™‚

Janne Sauvala14:01:49

I read your message on the re-frame channel; yes, use the sente-library with websockets ๐Ÿ™‚

Endre Bakken Stovner14:01:53

It seems like it uses websockets. It might be better for my use-case, as it is a continuous channel ๐Ÿ™‚

Endre Bakken Stovner14:01:58

Thanks for the help ๐Ÿ™‚

Endre Bakken Stovner12:01:18

Also, if you know any prior work I could steal ideas from, it would be much appreciated ๐Ÿ™‚