Deploying Shopify App In Netlify But Not Working

hello, I have developed the Shopify app using the Shopify PHP app template,

after completing development, I tried to deploy the app on Netlify.com,

and deployment is done successfully.

from Netlify, Netlify access the App via GitHub repository.

i have Import App repository in Netlify

but when I run the Netlify domain it gives an error,

also I have added the Environment Variable in Netlify

In my local system, I run the app using the “npm run dev” command. It creates the Cloudflare tunnel, and I copy that tunnel and paste it to the browser and my app was run, but how to set up this kind of URL in Netlify?

Example : https://reveals-cooperation-diamond.trycloudflare.com?shop=mysite.myshopify.com&host=bmNvZGVzaG9wLm15c2hvcGlmeS5jb20vYWRtaW4

strong textplease let me know what mistakes I do here. so that my App was not run?

@rushikesh I’m not sure what Shopify PHP app template you’re referring to, but if it requires runtime PHP hosting, then you won’t be able to host it on Netlify.

See:

@nathanmartin
im using this Shopify App Template GitHub - Shopify/shopify-app-template-php
for shopify app template.

@rushikesh I’ve only taken a very quick look at it, but it mentions having a Vite/React based front-end and a PHP/Larvel back-end.

So you may be able to host the front-end on Netlify, but not the back-end, you would need to host that elsewhere and then if necessary you could leverage proxies.

@nathanmartin

here is my Build configuration, on the above image,
I don’t understand what should I need to enter in Publish directory field

@rushikesh I’m not sure either, as I’ve never worked with what you’ve chosen to work with.

Generally speaking Vite builds into a dist folder.

You should build the front-end of your project locally and see what it produces, if it produces a dist folder, then that’s likely what you want to deploy.

1 Like

@nathanmartin i found the solution,
i need to enter

Publish directory: web/frontend/dist

Hi,
thanks for coming back and sharing your solution!

1 Like