Skip to content

shop3/shopify-strapi-demo

Repository files navigation

Shopify Strapi Demo

This demo is a simple Strapi application that uses the Shopify Strapi Plugin to connect to a Shopify store.

Getting Started

Prerequisites

Installation

  1. Clone the repository
git clone [email protected]:shop3/shopify-strapi-demo.git
  1. Install dependencies
npm install
  1. Create a .env file 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.
  1. Start ngrok (reverse proxy server)
npm run ngrok
  1. Add ngrok endpoints to environment variables inside .env and 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

  1. Start the application
npm run develop

License

MIT