summaryrefslogtreecommitdiff
path: root/main.js
diff options
context:
space:
mode:
authorJulien Dessaux2023-01-01 23:23:57 +0100
committerJulien Dessaux2023-01-02 20:26:28 +0100
commit3acf783d948ebb1907da875ef87b0da9ef2309ff (patch)
tree06b805fab10e638a9f5e66714ef4a29b6409c1e7 /main.js
parentRefactored game creation (diff)
downloadjeux-de-mots-3acf783d948ebb1907da875ef87b0da9ef2309ff.tar.gz
jeux-de-mots-3acf783d948ebb1907da875ef87b0da9ef2309ff.tar.bz2
jeux-de-mots-3acf783d948ebb1907da875ef87b0da9ef2309ff.zip
Began adding tests
Diffstat (limited to 'main.js')
-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;