Need help deploying my app / proxy with the app

Hello! If this is supposed to be in the “normal” shopify community posts, sorry for miss posting and ill move it there!

I’ll start with a short description of my app:
First and foremost this app is only supposed to be used for my own store, its for my own stores purpose, no other stores will be using the app.

Function of app:
Reading information from the product page > mapping it to SKU’s + getting image from mega.nz > Converting image to base 64 > sending base64 to POD provider API > Receiving back image > updating image on product page.

Description of issue:
When doing shopify app dev it works perfectly fine. But with shopify app deploy its not working. First thing I’m wondering is if I need separate hosting for this?
If I do, then do you know any free one?

If I don’t, then why is it not working when I do shopify app deploy. The app is installed on the store, and toggled on as an app embed. I can get to the step of converting the image to base64, but after that I get an error 404:

:white_check_mark: Found image with selector: .product-media img read-product.js:25:17

:outbox_tray: Calling API: /apps/mockup/generate-mockup read-product.js:176:15

:inbox_tray: Response status: 404 read-product.js:190:15

:white_check_mark: Found image with selector: .product-media img

Sorry for the emojis, doing this using AI and AI loves emojis.

This step works perfectly fine when doing shopify app dev because when I do shopify app dev it generates a url like “https ://vernon-birmingham-reflect-trim.trycloudflare.com/apps/mockup”. So I change my const API_URL to: “https ://vernon-birmingham-reflect-trim.trycloudflare.com/api/generate-mockup”; (it didnt work with “/apps/mockup/” for some reason, i dont remember why but worked with “/api/generate-mockup”. But then when trying to deploy I dont get a url, and i dont know what the API_URL should be, ive tried these:

const API_URL = “/apps/mockup/generate-mockup”;
const API_URL = “https ://domain.com/apps/mockup/generate-mockup”;
const API_URL =”https ://domain.com/api/generate-mockup”;

But none worked.

i also dont know if the 404 issue is only because of this or also because of my shopify.app.toml. Idk what that should look like, before when using shopify app dev it had only “example. com”, now ive tried to change it to “domain. com”. The fields im not sure about are: “application_url” “redirect_url” and “[app_proxy]” url. With domain. com there I still get error 404. (And for [“app_proxy”] url it was never domain. com it was “/apps/mockup”

As you can probably tell I’m a bit lost.

Since I dont rly know anything about the topic, I also dont really know what information to include in this post, so hope I’m not too all over the place. If you need any more information please tell me what you need.

Thanks for any and all help!

When you plan to use your custom app for production, you need to deploy it instead of using your local dev environment. Just running “shopify app deploy” is not enough. Basically you need to move your code to a hosting service, and then run “shopify app deploy” to connect it to Shopify, which will deploy what you have configured in your app’s toml file, and associated app extensions. You may refer to About deployment