Is it possible to add a frontend controller with a Shopify App?
I am trying to create an app that will create a custom controller. Example: My shopify store is test.myshopify.com
I want to develop an app that will allow me to display some json when requesting test.myshopify.com/testapp/getjson
I went through the Shopify app dev docs and can't find an answer there. Shopify dev docs don't go over frontend controllers, maybe its not even possible,
Answer
Solution:
You cannot make that URL work. If you want to make up an URL you can make an App that gets installed in a store. Once installed, if the App supports an App Proxy, you can have callbacks to that Proxy. You can choose from four extensions for your Proxy. /app/, /tools/, /community/, or I think just /a/ but whatever.
Anyway, that is what you get to do. When you make a callback to that URL, you can send some data to that endpoint, you can also send back JSON. So yes. 100%, you can do what you want, but you cannot just call it /testapp/getjson, you have to respect the Proxy call.
Source
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.