chore(server.js):Update Server Code to Use Environment Variable

This commit is contained in:
Ryan Mwangi 2024-11-04 21:14:31 +03:00
parent 17c3fb7b85
commit 5cfd0955f1
1 changed files with 2 additions and 1 deletions

View File

@ -8,7 +8,8 @@ import icalGenerator from 'ical-generator';
const app = express(); const app = express();
app.use(express.json()); app.use(express.json());
const MERGED_CALENDARS_DIR = 'calendar'; const MERGED_CALENDARS_DIR = process.env.TEST_MERGED_CALENDARS_DIR || 'calendar';
// Ensure the merged calendars directory exists // Ensure the merged calendars directory exists
if (!fs.existsSync(MERGED_CALENDARS_DIR)) { if (!fs.existsSync(MERGED_CALENDARS_DIR)) {