Shopify / Shopify/shopify-app-template-php

Running with a static url in development, issue with FRONTEND_PORT

Open
#484 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
340
Forks
108
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the README's local binding guidance and the dev script shown in the issue. Run the command with BACKEND_PORT and FRONTEND_PORT set, then trace how the development server assigns each port. Done means the frontend also honors FRONTEND_PORT so the configured static tunnel URL can be used consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
devops, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.