A progressive Node.js framework for building efficient and scalable server-side applications.
GDPR Audit Backend - API сервер для анализа веб-сайтов на соответствие GDPR.
Проект поддерживает 4 режима работы очереди для обработки сканирований:
QUEUE_TYPE=postgres- ✅ Использует базу данных PostgreSQL для хранения задач
- ✅ Не требует дополнительных сервисов (Redis)
- ✅ Простая настройка и деплой
⚠️ Подходит для небольших и средних нагрузок- 💡 Use case: Development, staging, малый/средний production
QUEUE_TYPE=redis
REDIS_URL=redis://localhost:6379- ✅ Высокопроизводительная очередь на базе Redis и BullMQ
- ✅ Локальный worker обрабатывает все задачи на VPS
- ✅ Лучшая производительность для высоких нагрузок
⚠️ Требует Redis сервер (дополнительная RAM ~64-128MB)- 💡 Use case: Production с высокой нагрузкой, все задачи обрабатываются локально
QUEUE_TYPE=hybrid
REDIS_URL=redis://localhost:6379
WORKER_URL=https://your-worker.run.app
OVERFLOW_QUEUE_THRESHOLD=2
OVERFLOW_WAIT_THRESHOLD_SEC=120- ✅ Оптимизация затрат: 90%+ задач обрабатываются локально (бесплатно)
- ✅ При пиковых нагрузках автоматически использует Cloud Run
- ✅ Cloud Run масштабируется до нуля ($0 в idle)
⚠️ Требует Redis + настройку Cloud Run worker- 💡 Use case: Production с переменной нагрузкой, оптимизация затрат
QUEUE_TYPE=cloudrun
WORKER_URL=https://your-worker.run.app- ✅ Полностью serverless, масштабируется автоматически
- ✅ Не требует постоянно работающего VPS worker
⚠️ Выше стоимость при постоянной нагрузке- 💡 Use case: Serverless архитектура, спорадические нагрузки
Общие переменные окружения:
QUEUE_TYPE=postgres|redis|hybrid|cloudrun # Тип очереди (по умолчанию: postgres)
REDIS_URL=redis://localhost:6379 # URL Redis (для redis/hybrid)
WORKER_ENABLED=true # Включить локальный worker
WORKER_CONCURRENCY=1 # Параллельные обработчики
WORKER_URL=https://worker.run.app # URL Cloud Run worker (для hybrid/cloudrun)
OVERFLOW_QUEUE_THRESHOLD=2 # Порог очереди для overflow (hybrid)
OVERFLOW_WAIT_THRESHOLD_SEC=120 # Порог ожидания для overflow (hybrid)Docker Compose профили:
postgres- API с PostgreSQL очередью (по умолчанию)redis- API с Redis/BullMQ очередью
Важно: При использовании QUEUE_TYPE=postgres RedisModule не инициализируется, что экономит ресурсы и предотвращает ошибки подключения к несуществующему Redis.
$ npm install# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:covWhen you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the deployment documentation for more information.
If you are looking for a cloud-based platform to deploy your NestJS application, check out Mau, our official platform for deploying NestJS applications on AWS. Mau makes deployment straightforward and fast, requiring just a few simple steps:
$ npm install -g @nestjs/mau
$ mau deployWith Mau, you can deploy your application in just a few clicks, allowing you to focus on building features rather than managing infrastructure.
Check out a few resources that may come in handy when working with NestJS:
- Visit the NestJS Documentation to learn more about the framework.
- For questions and support, please visit our Discord channel.
- To dive deeper and get more hands-on experience, check out our official video courses.
- Deploy your application to AWS with the help of NestJS Mau in just a few clicks.
- Visualize your application graph and interact with the NestJS application in real-time using NestJS Devtools.
- Need help with your project (part-time to full-time)? Check out our official enterprise support.
- To stay in the loop and get updates, follow us on X and LinkedIn.
- Looking for a job, or have a job to offer? Check out our official Jobs board.
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
- Author - Kamil Myśliwiec
- Website - https://nestjs.com
- Twitter - @nestframework
Nest is MIT licensed.