BullMQ email queue with Redis, plus an in-memory fallback when REDIS_URL is unset.
npm install
cp .env.example .env
npm run devWithout Redis, jobs run through the in-memory fallback (ideal for local dev and tests).
With Redis:
# start redis locally, then set REDIS_URL in .env
REDIS_URL=redis://localhost:6379 npm run devEnqueue an email job:
curl -X POST http://localhost:3000/api/jobs/email \
-H "Content-Type: application/json" \
-d '{"to":"user@example.com","subject":"Hello","body":"Queued message"}'npm test| Example | Topic |
|---|---|
| 08-events | Domain events |
| 10-redis-cache | Redis cache |
| 12-docker-compose | Postgres + Redis via Docker |