diff --git a/web/frontend b/web/frontend index 800eb869..3160b2c3 160000 --- a/web/frontend +++ b/web/frontend @@ -1 +1 @@ -Subproject commit 800eb8691cb9585e6f14e8fb940d87ebe0f34e9d +Subproject commit 3160b2c314d3271ce579f6f848252406163793c9 diff --git a/web/index.js b/web/index.js index 7817acc0..34099c3d 100644 --- a/web/index.js +++ b/web/index.js @@ -67,7 +67,11 @@ app.use("/*", shopify.ensureInstalledOnShop(), async (_req, res, _next) => { return res .status(200) .set("Content-Type", "text/html") - .send(readFileSync(join(STATIC_PATH, "index.html"))); + .send( + readFileSync(join(STATIC_PATH, "index.html")) + .toString() + .replace("%VITE_SHOPIFY_API_KEY%", process.env.SHOPIFY_API_KEY || "") + ); }); app.listen(PORT);