ClojureScript repl over proxy

2021-04-21 Thread Maksim Ryzhikov
Hi,

I'm using a cloud development platform (Gitpod) and it automatically 
creates proxy from public URL to localhost, so you can develop a web 
application from cloud and see the result. I'm trying to run cljs REPL, but 
it fails to connect because it tries to connect to the REPL on 
`localhost:9090` which is not accessible from outside because I use public 
URL in a browser.

I have looked at the code and looks like HOST and PORT in browser hard-coded
https://github.com/clojure/clojurescript/blob/a4673b880756531ac5690f7b4721ad76c0810327/src/main/cljs/clojure/browser/repl.cljs#L31
 
but still maybe I have missed something, and it's possible to set up REPL 
for my use case. So would be glad to any response

Thanks

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/df1f05bc-8810-42ef-9002-66192227e6f0n%40googlegroups.com.


Re: Routing for a non-web-app

2021-04-21 Thread Harold
>> ...is intended for use with Ring middleware, HTTP servers...
>
> sorta made me think it wouldn't work in a non-web app.
>

Understood.

One of the coolest things about bidi is that it's just functions that 
operate on data.

Nothing ring, web, or http specific going on here:

> (require 'bidi.bidi)
nil
> (bidi.bidi/match-route ["/foo" :bar] "/foo")
{:handler :bar}
> (bidi.bidi/match-route [["/foo/" :id] :bar] "/foo/17")
{:route-params {:id "17"}, :handler :bar}
> (bidi.bidi/path-for [["/foo/" :id] :bar] :bar :id 17)
"/foo/17"

---

Hope that helps,
-Harold
On Tuesday, April 20, 2021 at 8:35:11 PM UTC-6 dsblak...@gmail.com wrote:

> Cool. I thought about bidi but this:
>
> ...is intended for use with Ring middleware, HTTP servers...
>
>  sorta made me think it wouldn't work in a non-web app.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/fbd94185-4401-4311-85b3-639fafbbb787n%40googlegroups.com.


Re: Routing for a non-web-app

2021-04-21 Thread Brandon R
Bidi probably would work fine for what you want, but I'll also second the
reitit suggestion.

On Wed, Apr 21, 2021 at 4:54 PM Harold  wrote:

> >> ...is intended for use with Ring middleware, HTTP servers...
> >
> > sorta made me think it wouldn't work in a non-web app.
> >
>
> Understood.
>
> One of the coolest things about bidi is that it's just functions that
> operate on data.
>
> Nothing ring, web, or http specific going on here:
>
> > (require 'bidi.bidi)
> nil
> > (bidi.bidi/match-route ["/foo" :bar] "/foo")
> {:handler :bar}
> > (bidi.bidi/match-route [["/foo/" :id] :bar] "/foo/17")
> {:route-params {:id "17"}, :handler :bar}
> > (bidi.bidi/path-for [["/foo/" :id] :bar] :bar :id 17)
> "/foo/17"
>
> ---
>
> Hope that helps,
> -Harold
> On Tuesday, April 20, 2021 at 8:35:11 PM UTC-6 dsblak...@gmail.com wrote:
>
>> Cool. I thought about bidi but this:
>>
>> ...is intended for use with Ring middleware, HTTP servers...
>>
>>  sorta made me think it wouldn't work in a non-web app.
>>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/clojure/fbd94185-4401-4311-85b3-639fafbbb787n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/CAB_6y6FLk-Rf1Cs21_%2Be_aNA7DmCj1o0NqgDE50y%2BPgJNMr7Mg%40mail.gmail.com.