im a creating an app by following node js react tutorial,I am able to create js scripts using script tag to display in shop front end,but am not able to access the app route URL from script tag js script ,I need to access the some of the url of next js app from public(store embed js script to get dynamic data) ,how can I do this?also I need to access store api form script tag java script file based on the store front end customer action.
If I understood your question correctly, if you're developing your app locally, then you will need to use some sort of HTTP/S tunnel such as Ngrok for your app to be publicly accessible.
As for being able to display dynamic data from your app in your store, unless your app is loaded in the theme as a JS app, you may need to use an application proxy.
Hope that helps!
I am using ngrok for tunneling with my local host,I have loaded my app js file to online store using script tag and I want to access my app directly from the js file to get data from my app to display in online store front ,if I use post man to hit the api url to get the data below response ,if i send the shop name with the url it redirects to admin login.
Expected a valid shop query parameter
Not sure I follow entirely, but is your app script trying to hit an Admin API, if so that won't work from the storefront without you having your own API to make these Admin API requests.
i.e. say you wanted your app to edit orders from within the storefront. Your storefront scripts cannot call orderEditBegin mutation because that's a GraphQL Admin API but your apps backend can thus your app script calls your API, your API calls Shopify Admin API.