summaryrefslogtreecommitdiff
path: root/main.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--main.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/main.js b/main.js
index c3ab576..391a4fe 100644
--- a/main.js
+++ b/main.js
@@ -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;