App reviews, troubleshooting, and recommendations
Hi!
I am having trouble with setting up my shopify.web.toml files for my NodeJS project, and I don't really understand the documentation. It isn't very clear and concise to me.
So, I want my app to run under a frontend and a backend process ( 2 separate processes). And I want my code to be structured so that they are separated from eachother, i.e. /web/frontend + /web/backend.
My question is, How do I setup my shopify.web.toml files inside these folders so that they can run, and also, how do I add a dedicated port for the backend service?
Any help would be greatly appreciated.
You should take a look at the app-template-node repository, as it has examples of shopify.web.toml configs that run commands: https://github.com/Shopify/shopify-app-template-node
As far as the backend port, you have to set that in vite.config.js, look at the `proxyOptions` variable. It defaults to `BACKEND_PORT`, which is an environment variable set by the Shopify CLI, but you can switch it to something hard-coded. Just make sure to use the same port in your backend code.
Thx!
But, the shopify app-template node repository uses depracated definitions to accomplish this, i.e. it doesn't use roles, instead it uses type.
There is supposedly a way to do this using the roles and a port value that is defined in the documentation (https://shopify.dev/docs/apps/tools/cli/structure) but I can't get it to work.
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024