anvil-works / anvil-runtime

The runtime engine for hosting Anvil web apps
https://anvil.works/open-source
Other
874 stars 116 forks source link

url format for uplink to connect to runtime #62

Closed j2l closed 2 years ago

j2l commented 2 years ago

My uplink python script registers to anvil.works/uplink and works fine. Now, I tried to connect the uplink to my runtime and failed. The url at https://github.com/anvil-works/anvil-runtime/blob/89b6d15bc5a1bd2bc9aee4938abd3bbf26b6e0ec/uplink/python/anvil/server.py#L345 doesn't seem to transpose as wss://<publicip>:<port>/uplink Is there another url to use for runtime?

Or is it related to the missing service-core root at https://github.com/anvil-works/anvil-runtime/blob/89b6d15bc5a1bd2bc9aee4938abd3bbf26b6e0ec/server/app-server/src/anvil/app_server/run.clj#L208 and it will be fixed soon?

meredydd commented 2 years ago

wss:// means an HTTPS connection; you're looking for ws://host/_/uplink!

j2l commented 2 years ago

Thanks @meredydd I use HTTPS, but I'll give ws a try.

meredydd commented 2 years ago

Aha - in which case I have misunderstood your question. In that case, this is the right question:

Is there another url to use for runtime?

Yes! You want to go for wss://my.app.server.com/_/uplink (note /_/). Our next release will add an HTTPS-specific example to the docs here for extra clarity.

j2l commented 2 years ago

Thank you @meredydd

j2l commented 2 years ago

the missing service-core root at

https://github.com/anvil-works/anvil-runtime/blob/89b6d15bc5a1bd2bc9aee4938abd3bbf26b6e0ec/server/app-server/src/anvil/app_server/run.clj#L208

Any ETA for this one?