dante
Let's try some E-Commerce.
Prerequisities
- Install Node.js >=18.7.0 - https://Node.js.org/en/download/. Recommended through NVM.
- Install IDE, recommended Visual Studio Code.
- Netlify account.
- Stripe account.
Setup
- Setup
.env
file with Stripe credentials in format
STRIPE_PUBLISHABLE_KEY="put stripe publishable key here"
STRIPE_PRODUCT_PRICE_ID="put procut price id herere"
- Install dependencies
npm install
- Run local, dev build:
npm run develop
- Run production build:
npm run build
Troubleshooting
If changes seem to not be reflected in the build, try cleaning cache using
npm run clean
VSCode recommended plugins
Useful links
Stripe
- Stripe Payment Element
- Testing
- Orders overview
- Integrating Stripe with Polish payment gateways
- Quickstart: Gatsby Stripe Checkout 2021
- Digital Wallet payments with React Stripe Elements and Netlify Functions
- How to create a Jamstack pet store app using Stripe, Gatsbyjs, and Netlify functions
- Building a Serverless E-commerce Store with Stripe, Netlify, & 11ty
Netlify
- Netlify Functions docs
- Serverless Functions and TypeScript on Netlify (with Tomasz ลakomy) โ Learn With Jason
GatsbyJS
- TypeScript and Gatsby
- Install Tailwind CSS with Gatsby
- Documentation
- Tutorials
- API Reference
- Plugin Library
- Cheat Sheet
E-Commerce
API
- axios-hooks - React hooks for axios, with built-in support for server side rendering.
- Integrating Axios with React Hooks
- How to use async functions in useEffect (with examples)
- Make an Http request on click in React
Google Analytics
DevOps
- Gatsby Incremental Builds and Github Actions
- Super fast npm install on Github Actions
- Caching dependencies to speed up workflows
- Create a site from a template using the Netlify CLI