Skip to content

Commit

Permalink
Add local Stripe webhook forwarding
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenbleasel committed Jan 7, 2024
1 parent 3eb8ed6 commit 10957e3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ You will need the following things properly installed on your computer.
- [Node.js](https://nodejs.org/)
- [pnpm](https://pnpm.io/)
- [pscale](https://planetscale.com/docs/concepts/planetscale-environment-setup)
- [Stripe CLI](https://stripe.com/docs/stripe-cli)

## Usage

Expand All @@ -67,6 +68,18 @@ Then, update any reference of `/CompanyName/` in the legal docs. You can do this
grep -rl '/CompanyName/' content/legal/ | xargs sed -i '' 's|/CompanyName/|Acme|g'
```

Login to Stripe with:

```sh
stripe login
```

Login to Planetscale with

```sh
pscale auth login
```

Finally, run the development server with:

```sh
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"scripts": {
"dev": "concurrently \"pnpm:planetscale\" \"pnpm:next\" \"pnpm:prisma\" \"pnpm:email\"",
"dev": "concurrently \"pnpm:planetscale\" \"pnpm:next\" \"pnpm:prisma\" \"pnpm:email\" \"pnpm:stripe\"",
"next": "next dev",
"planetscale": "pscale connect [database] dev --port 3309",
"prisma": "npx prisma generate && npx prisma studio",
Expand All @@ -11,7 +11,8 @@
"analyze": "ANALYZE=true pnpm build",
"postinstall": "prisma generate",
"email": "email dev --port 3005",
"contentlayer": "npx contentlayer build"
"contentlayer": "npx contentlayer build",
"stripe": "stripe listen --forward-to localhost:3000/api/webhooks/stripe"
},
"dependencies": {
"@clerk/nextjs": "^4.29.1",
Expand Down

0 comments on commit 10957e3

Please sign in to comment.