Shopify / shopify-app-template-php

263 stars 85 forks source link

Running with a static url in development, issue with FRONTEND_PORT #484

Open Thullner opened 8 months ago

Thullner commented 8 months ago

Issue summary

I would like to run with a static url for the app in development, since the app url is used in other applications.

Expected behavior

I've set up a cloudflare to point through a static url. This works fine with for example react. I've used the following settings: image

From the readme of this repo, i also saw that you can locally bind to 3000, similar to react and it should work.

Actual behavior

The ports for frontend and backend locally get a random number assigned (40000+). The backend port i can override, however the frontend port does not get overridden.

"dev": "cross-env BACKEND_PORT=15000 FRONTEND_PORT=15001 shopify app dev --tunnel-url=https://shopifyXX.XXX.dev:443",

I can then tunnel the backend to the url (if i change the cloudflare config). However the frontend port keeps being random.