https://github.com/olegchuev/node-js-skillup
https://github.com/olegchuev/node-js-skillup
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/olegchuev/node-js-skillup
- Owner: OlegChuev
- Created: 2023-05-25T11:57:56.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-19T03:32:21.000Z (over 1 year ago)
- Last Synced: 2025-01-02T14:21:48.328Z (5 months ago)
- Language: JavaScript
- Size: 1.05 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node.js Skill-up
Short project description or overview.
## Prerequisites
- Docker: [Installation Guide](https://docs.docker.com/get-docker/)
- Docker Compose: [Installation Guide](https://docs.docker.com/compose/install/)## Getting Started
These instructions will help you set up the development environment for the project.
1. Clone the repository:
`git clone https://github.com/OlegChuev/node-js-skillup.git`
2. Navigate to the project directory:
`cd node-js-skillup`
3. Create .env from .env.example and edit required variables.
`cp .env.example .env`
4. Build and start the Docker containers:
`docker compose up -d`
The application should now be running at `http://localhost:3000`.
## Development
* After making changes to the database schema or adding new migrations, execute
`npx prisma migrate dev`
to apply pending migrations, generate a new migration for any changes you made, etc.
For more details, check the official [docs](https://www.prisma.io/docs/concepts/components/prisma-migrate/migrate-development-production).
## Testing
1. Create .env.test from .env.example and edit required variables.
2. Create required database in psql.
3. To run tests use the following command:
`docker compose run --rm web npm test`
## Stripe
To trigger webhooks in the local environment, please use the dedicated container `stripe-cli`.
Note that it requires STRIPE_WEBHOOK_KEY for correct work. The results of webhook events are displayed here on the [dashboard](https://dashboard.stripe.com/test/customers).`docker compose run --rm stripe-cli trigger invoice.payment_failed`