diff --git a/server/__tests__/server.test.js b/server/__tests__/server.test.js index 1d657be..2156ddf 100644 --- a/server/__tests__/server.test.js +++ b/server/__tests__/server.test.js @@ -3,6 +3,7 @@ const path = require('path'); const express = require('express'); const boardRoutes = require('../routes/boardRoutes'); + // Import the Express app const createApp = require('../server'); diff --git a/server/server.js b/server/server.js index edb929e..e131965 100644 --- a/server/server.js +++ b/server/server.js @@ -36,6 +36,9 @@ app.get(reactRoutes, (req, res) => { }); // Start the server + +if (process.env.NODE_ENV !== 'test') { app.listen(port, () => { console.log(`Server is running on port ${port}`); }); +} \ No newline at end of file