1
0
Fork 0

Conditional Server Start in server.js for Test Environment

This commit is contained in:
Ryan Mwangi 2024-11-04 14:23:09 +03:00
parent 1631ba3478
commit 55287b9a75
1 changed files with 6 additions and 5 deletions

View File

@ -245,11 +245,12 @@ function saveCalendarData(calendarId, linkGroupName, calendars) {
} }
// Start the server // Start the server
if (process.env.NODE_ENV !== 'test') {
const port = 3000; const port = 3000;
app.listen(port, () => { app.listen(port, () => {
if (process.env.NODE_ENV !== 'test') {
console.log(`Server started on port ${port}`); console.log(`Server started on port ${port}`);
}
}); });
}
export default app; export default app;