FROM CACHE - en_header

ngrok Update App url and redirect url via API

TheFlyingCoder
Shopify Partner
6 0 2

Pretty simple question that I can't seem to find the solution for anywhere.

During development, every restart of ngrok free version requires an update of the app URL and redirect url's.

I noticed the Shopify CLI can do this automatically, but I can't find the documentation for it?

I'm rolling a custom framework and want to embed the functionality in my server script like so:

  if (MODE === "development") {
    HOST = await ngrok.connect(port);
    console.log("ngrok tunnel live at ", HOST);
    open(HOST);
    //Update the app URL and redirect urls
    await setAppUrlAndWhitelist(HOST)
  }

 

Reply 1 (1)
rohanrajpal
Tourist
10 0 0

+1 for this, it's a pain to set the app URL every time ngork restarts. Can anyone please help?

Founder | meetspur.com
Feel free to reach out to me at howdyrohan@gmail.com or @rohanrajpal98 on Twitter