Stores
.Add store
.Before this, ensure that you have added a new product.
$ npx create-next-app shopify-storefront -e with-typescript # ... creates storefront $ cd shopify-storefront $ touch utils/shopify.ts
In utils/shopify.ts
, add the following:
import Client from "shopify-buy" export const client = Client.buildClient({ storefrontAccessToken: process.env.SHOPIFY_STORE_FRONT_ACCESS_TOKEN, domain: process.env.SHOPIFY_STORE_DOMAIN, })
At this stage, you will need to create an app on your store admin page.
Within the app, set all Storefront API
permissions.