App reviews, troubleshooting, and recommendations
I have deployed my shopify app on heroku and updated app url and redirection url in partners dashboard now after testing I found some bugs on it so now I have to change app url and redirection to my local host (ngrok) again to fix these bugs and then for testing I have to change it to heroku. Is there any way I can do both without changing urls because It is hard to change url's again and again for testing and bug fixing.
Can you help me over this
https://community.shopify.com/c/shopify-apps/shopify-node-app-oauth/td-p/2145256
The easiest option is to create 2 separate apps: one for production, one for development. You need to make sure to turn off the option for automatically overwriting the app's redirect URL's in the Shopify CLI, whenever you're working on the production app. Use the command `npm run dev -- --reset` to change the settings.
Hi, I am facing similar issue.
I understood what you said here, but what about `shopify.app.toml`? This file is linked to dev app. If I push my git repo to prod, how to change/disregard the `shopify.app.toml` file?
Hii @Mohit_garg , can you help me in, how to deploy the app and also how to generate the build for the created shopify app. Its on cloudflare still.
Hi @Mohit_garg ,
what I do is to have a second app registered in the partners dashboard: a duplication of the production app. Any new releases just pushes the second app to production whenever a bug is fixed. So I do not have to change any urls. Hope this helps.
Regards
Thomas
Set up two apps then use the --config flag to run dev and deploy for specific targets with toml config files:
1. Create app with CLI
1b. Update shopify.app.toml with publicly accessible production URLS and set
2. Deploy: npm run deploy
3. Update URLs, if not done so already
4. Create new toml config for development: npm run shopify app dev -- --reset
4b. Choose "Create new app" and name it the same as the production app but with " Dev" on the end.
5. Migrate scopes to new toml config from shopify.app.toml as they will be blank in the new config (e.g. shopify.app.myappname-dev.toml)
6. Run Development: npm run dev -- --config shopify.app.myappname-dev.toml
7. Run Deploy: npm run deploy -- --config shopify.app.toml (or whatever your production config is... it doesn't need to be "shopify.app.toml")
You could also add these to your npm scripts like:
"scripts": {
"dev": "shopify app dev --shopify.my-dev-app.toml",
"deploy": "shopify app deploy --shopify.my-prod-app.toml",
}
Reference: https://shopify.dev/docs/apps/tools/cli/configuration
Hope that helps.
Forgot to add npm run shopify app config link to link your shopify.app.toml to your production app. Then there is no need to add a specific --config flag to deploy. It's default. More here: https://shopify.dev/docs/apps/tools/cli/managing-app-configuration-files#test-your-app-functionality
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024