Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Shopify/gated-hydrogen-example
https://github.com/Shopify/gated-hydrogen-example
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/Shopify/gated-hydrogen-example
- Owner: Shopify
- Created: 2023-05-22T23:10:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-18T03:50:55.000Z (8 months ago)
- Last Synced: 2024-08-04T01:05:11.476Z (6 months ago)
- Language: TypeScript
- Size: 1.32 MB
- Stars: 13
- Watchers: 92
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/contributing.md
- Code of conduct: .github/code_of_conduct.md
Awesome Lists containing this project
- awesome-hydrogen - Tokengated Storefront Example
README
# Gated Hydrogen Example
This is an example repository which can be used to follow along in the [build a tokengated storefront tutorial series](https://shopify.dev/docs/apps/blockchain/tokengating/build-a-tokengated-storefront).
## Getting started
Remember to update `.env` with your shop's domain and Storefront API token!
1. Replace instances of `headless_gating_example` with your gate configuration's metafield namespace.
2. Replace instances of `_headless_gate_context` with 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
```bash
npm run dev
```## License
MIT © [Shopify](https://shopify.com/), see [LICENSE.md](LICENSE.md) for details.