chr33s / shopflare

Shopify app on Cloudflare pages starter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ShopFlare

Shopify app running on cloudflare pages

Requirements

  1. Cloudflare account
  2. cloudflared cli brew install cloudflared
  3. Node.js & NPM see package.json#engines brew install node@20
  4. Actionlint brew install actionlint

Setup

npx wrangler pages project create {project-name}

cp .env .env.local # update values
export $(cat .env.local | xargs)
  • copy .env.cloudflare vars to Cloudflare pages > Environment variables
  • create Workers > KV store key SHOPFLARE_KV & attach it to pages > Settings > KV namespace bindings
  • copy .env.github vars to Github > secrets and variables

Development

npm install
npm run dev
# open -a Safari {cloudflared.url}

Production

npm run build
npm run deploy

Changelog

Documentation

Method(s) URL
GET /api/auth/callback?
POST /api/proxy/graphql/admin
POST /api/proxy/graphql/storefront
ALL /api/proxy/rest/:path
POST /api/graphql

Copyright

Copyright (c) 2023 chr33s. See LICENSE.md for further details.

About

Shopify app on Cloudflare pages starter

License:MIT License


Languages

Language:TypeScript 99.2%Language:HTML 0.8%