How can I send a request from an app snippet to my app server?

Hey everyone,

I was wondering how I can send a request from an app snippet to my Shopify app server. So for example I want to send a “custom id” from the frontend to my app server and then return a “product id”. The request should also include the context of what store I’m in.

Is there a best practice way to do this?

How can I handle this with a dev environment and ngrok url?

Do I need to handle everything manually? I have created my app with the Shopify Node CLI command.

Looking forward to your help and thanks in advance.