This demo is a simple Strapi application that uses the Shopify Strapi Plugin to connect to a Shopify store.
- Clone the repository
git clone git@github.com:shop3/shopify-strapi-demo.git- Install dependencies
npm install- Create a
.envfile in the root of the project and add the following environment variables:
APP_KEYS- A comma-separated list of keys for Strapi admin.JWT_SECRET- A secret for Strapi admin.API_TOKEN_SALT- A salt for generating API tokens.ADMIN_JWT_SECRET- A secret for generating API tokens.HOST_NAME- The hostname of the Strapi application.SHOPIFY_API_KEY- The API key of the Shopify application.SHOPIFY_API_SECRET- The API secret of the Shopify application.SHOPIFY_SCOPES- The scopes of the Shopify application.SHOPIFY_APP_EMBEDDED- Whether the Shopify application is embedded.SHOPIFY_REDIRECT_URL- The redirect URL of the Shopify application.SHOPIFY_APP_NAME- The name of the Shopify application.
- Start ngrok (reverse proxy server)
npm run ngrok- Add ngrok endpoints to environment variables inside
.envand in Shopify app configuration:
.env
HOST_NAME=example.ngrok.io
SHOPIFY_REDIRECT_URL=https://example.ngrok.io
Look here for Shopify documentation: https://github.com/shop3/strapi-plugin-shopify#shopify-configuration
- Start the application
npm run develop