Fork me on GitHub
#portal
<
2022-11-24
>
Dallas Surewood08:11:52

What exactly does portal.nrepl/wrap-portal do?

djblue00:11:45

It will intercept, format and tap> eval results. It will also proxy the results to the requesting client so it should most be a transparent value tapper.

Dallas Surewood02:11:38

And is it something you would wrap around an app like ring middleware? Or is it wrapped around function definitions?

djblue02:11:33

This is something you hand to nrepl when starting your repl

Dallas Surewood02:11:19

I'm using the integrant repl so I'll need to figure out how to use this

djblue02:11:03

I haven't seen that before :thinking_face: how does it allow for middleware?

Dallas Surewood02:11:46

Not sure. I'm using kit-clj so it is sort of a template for integrant projects using deps

Dallas Surewood02:11:05

I'll have to see if they left a middleware spot anywhere

Dallas Surewood02:11:43

I don't have that block

djblue02:11:26

Not sure what you mean

Dallas Surewood02:11:13

I don't know what that nrepl block is for but I don't believe this project uses that kit nrepl. It's just calling "go" from integrant.repl

Dallas Surewood02:11:56

Sounds like kit had an idea for using that repl namespace but it's not being used right now in the projects you spin up with it

Dallas Surewood09:11:21

I can't seem to get Portal working with Clojurescript. It says I am missing "node-libs-browser" as a dependency and should npm install shadow-cljs, but shadow-cljs is already installed. I've even manually installed node-libs-browser and it doesn't work

djblue00:11:21

In the browser or node?

djblue00:11:04

Also, can you provide details about your setup and what you are trying to achieve?

Dallas Surewood01:11:02

I think I got this working. my setup is a bit confusing and I was trying to use the wrong api call in the browser repl thinking it was the node repl

Dallas Surewood02:11:18

Actually no, it's not working. I got this error. Cannot set properties of null (setting 'onunload')

Dallas Surewood02:11:30

I'm using calva with shadow-cljs pointing to my deps.edn.

Dallas Surewood02:11:43

So portal is in a :shadow profile that both clj and cljs have access to

djblue02:11:52

That error means you need to enable popups

djblue02:11:48

Yup, just for the domain/port that is hosting your app with portal.web