Gated Hydrogen Example
June 23, 2023 · View on GitHub
This is an example repository which can be used to follow along in the build a tokengated storefront tutorial series.
Getting started
Remember to update .env with your shop's domain and Storefront API token!
- Replace instances of
headless_gating_examplewith your gate configuration's metafield namespace. - Replace instances of
_headless_gate_contextwith your desired cart attributes key name (this is referenced in your Shopify Function).
Sample .env
ALCHEMY_API_KEY="YOUR_ALCHEMY_API_KEY"
SESSION_SECRET="YOUR_SESSION_SECRET"
SHOPIFY_FUNCTION_SECRET="YOUR_FUNCTION_SECRET"
PUBLIC_STOREFRONT_API_TOKEN="YOUR_API_TOKEN"
PUBLIC_STOREFRONT_API_VERSION="unstable"
PUBLIC_STORE_DOMAIN="YOUR_STOREFRONT_DOMAIN"
Local development
npm run dev
License
MIT © Shopify, see LICENSE.md for details.