diff options
Diffstat (limited to 'main.js')
-rw-r--r-- | main.js | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -15,5 +15,9 @@ app.use("/games", gamesRouter); app.use("/static", express.static("static")); app.use("/", rootRouter); -const port = process.env.PORT || 3000; -app.listen(port, () => console.log(`listening on port ${port}`)); +if (process.env.NODE_ENV !== "test") { + const port = process.env.PORT || 3000; + app.listen(port, () => console.log(`listening on port ${port}`)); +} + +export default app; |