fix: add dotenv to PDF generator for environment variable loading
- Added require('dotenv').config() to load .env file
- Enables MONGODB_URI and MONGODB_DB to be read from environment
- Required for script to work in production with authenticated MongoDB
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
1ee1499f1b
commit
4620329fe0
1 changed files with 1 additions and 0 deletions
|
|
@ -4,6 +4,7 @@
|
||||||
* Uses Puppeteer (headless Chrome) for PDF generation
|
* Uses Puppeteer (headless Chrome) for PDF generation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require('dotenv').config();
|
||||||
const { MongoClient } = require('mongodb');
|
const { MongoClient } = require('mongodb');
|
||||||
const puppeteer = require('puppeteer');
|
const puppeteer = require('puppeteer');
|
||||||
const fs = require('fs').promises;
|
const fs = require('fs').promises;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue