This document explains how to update a Shopify CLI generated application from the setup Gadget previously recommended before Dec 21, 2022, to the new setup Gadget recommends.
Previously, Gadget recommended removing the web/package.json
and web/shopify.web.toml
files, stripping away the node.js server that served the frontend application in web/frontend
. Most web hosts have functionality to serve static files in the same manner this node.js application does, as well as set up redirects and headers. Since Gadget handles the majority of the backend, this node.js backend largely duplicates Gadget functionality.
That said, it is annoying to set up each different frontend hosting provider's tooling to meet Shopify's strict iframe
security requirements for apps destined for the Public App Store. Shopify requires that each application is served to the embedded app iframe with the Content-Security-Policy
header set to a secure value. Read more about Shopify's iframe security requirements [her