https://github.com/arielfaur/nestjs-stripe-example
Sample nestjs and Stripe Checkout integration. Backend running on Docker containers Angular frontend runs on host machine.
https://github.com/arielfaur/nestjs-stripe-example
angular docker docker-compose mongodb nestjs stripe
Last synced: 3 months ago
JSON representation
Sample nestjs and Stripe Checkout integration. Backend running on Docker containers Angular frontend runs on host machine.
- Host: GitHub
- URL: https://github.com/arielfaur/nestjs-stripe-example
- Owner: arielfaur
- Created: 2021-12-03T01:06:01.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-17T01:15:03.000Z (over 4 years ago)
- Last Synced: 2025-02-26T02:42:01.853Z (over 1 year ago)
- Topics: angular, docker, docker-compose, mongodb, nestjs, stripe
- Language: TypeScript
- Homepage:
- Size: 311 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# Nest - Stripe Checkout integration example
## Instructions
1. Define NODE_ENV environment variables
```
PORT=3000
STRIPE_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxxxx
STRIPE_TEST_KEY=sk_test_xxxxxxxxxxxxxxxxxxxxxxxxxx
```
Note: STRIPE_WEBHOOK_SECRET key is required for webhook debugging
2. Launch backend services (Nest JS, MongoDB, Mongo-Express, Redis ...)
```
docker-compose up dev
````
3. Listen to Stripe event on localhost (optional)
stripe login
stripe listen --forward-to localhost:3000/order/webhook
4. Start Angular frontend
```
cd client
npm install
ng serve
```
5. Browse frontend on http://localhost:4200
6. MongoDB explorer on http://localhost:8081
- Check that an initial myDatabase has been created
- Check that an initial tickets collection has been created
7. Browse Swagger API on http://localhost:3000/api
## Changelog
2021-12-09 Added mongoose service layer and list of ordered items
## TODO
- ~~Missing MongoDB integration (currently using in-memory storage)~~
- Tests (unit/integration)