Re: How to get applicationUrl from theme extension?

Solved

How to get applicationUrl from theme extension?

Moonloon
Shopify Partner
8 0 1

I am building an app that has a Block theme extension, and backend part.

 

I am using Remix app template.

 

When I run app with "shopify app dev" it starts my app with a Cloudflare proxy like pathology-repository-float-dts.trycloudflare.com (just an example)

 

My Block needs to make ajax requests to my backend remix server. 

 

But how can I know the URL if it is dynamically generated each time when I run "shopify app dev" ?

Accepted Solution (1)

Sonya_2025
Shopify Partner
254 33 47

This is an accepted solution.

Hi @Moonloon 

Welcome to Shopify Community.

You need using app Proxy to help you generate a fixed url address calling from your block. Please have a check.

 

Hope this helps.

Please let me know if it works by giving it a Like or marking it as a solution!
Feel free to reach out. EMAIL ME  
Motivate me by  PAY ME

View solution in original post

Replies 2 (2)

MaverickStudio
Shopify Partner
101 32 34

Hey @Moonloon,

Welcome to the community mate!

In that case use an ngrok tunnel url that will be static. Make sure to turn off the updates URL on dev option in your toml. Once you are ready for prod, just switch the urls and you're good to go.

Ngrok has a free tier that can be used by just signing up, it has limited egress of 1gb per month. 

♥ If you found my solution helpful, please consider giving it a Like and marking it as the ✔ Accepted Solution


Try our WhatsApp Chat Button Widget with multipe agents.Supachat: WhatsApp Chat Button


A Product of Maverick Studio

Sonya_2025
Shopify Partner
254 33 47

This is an accepted solution.

Hi @Moonloon 

Welcome to Shopify Community.

You need using app Proxy to help you generate a fixed url address calling from your block. Please have a check.

 

Hope this helps.

Please let me know if it works by giving it a Like or marking it as a solution!
Feel free to reach out. EMAIL ME  
Motivate me by  PAY ME