1. Configure the app URL
Set SHOPIFY_APP_URL in .env and the same URL in shopify.app.toml. The current configured URL is:
https://discount.example.com
Preview route
The public preview is loading. Discount creation runs inside Shopify Admin at /app, after the app is installed and the discount function is deployed.
Set SHOPIFY_APP_URL in .env and the same URL in shopify.app.toml. The current configured URL is:
https://discount.example.com
Run npm run deploy or shopify app deploy. The app page detects the deployed Shopify Function ID after that.
Open the app from Shopify Admin. Choose Coupon code, enter a code such as B2G1, select the detected function, then create the discount.