forked from ryanmwangi/CalMerger
Conditional Server Start in server.js for Test Environment
This commit is contained in:
parent
1631ba3478
commit
55287b9a75
11
server.js
11
server.js
|
@ -245,11 +245,12 @@ function saveCalendarData(calendarId, linkGroupName, calendars) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start the server
|
// Start the server
|
||||||
const port = 3000;
|
if (process.env.NODE_ENV !== 'test') {
|
||||||
app.listen(port, () => {
|
const port = 3000;
|
||||||
if (process.env.NODE_ENV !== 'test') {
|
app.listen(port, () => {
|
||||||
console.log(`Server started on port ${port}`);
|
console.log(`Server started on port ${port}`);
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
|
|
||||||
|
|
||||||
export default app;
|
export default app;
|
Loading…
Reference in New Issue