This is a Next.js + Shopify Cart API demo! Check out the site here. If you want to make your own version, make sure you create a Shopify account and create some products, and install the Netlify CLI.
Once you have your shop set up, add environment variables to your setup:
SHOPIFY_STOREFRONT_API_TOKEN=example
SHOPIFY_API_ENDPOINT=https://exampleshopify/graphql.json
See more about the setup in this blog post.
(If you click this button, it will create a new repo for you that looks exactly like this one, and sets that repo up immediately for deployment on Netlify)
First, run the development server:
npm start
Open http://localhost:8888 with your browser to see the result.
Option one: One-click deploy
Option two: Manual clone
- Clone this repo:
git clone https://github.com/cassidoo/shopify-next-netlify.git
- Navigate to the directory and run
npm run dev
- Make your changes
- Connect to Netlify manually (the
netlify.toml
file is the one you'll need to make sure stays intact to make sure the export is done and pointed to the right stuff)