summaryrefslogtreecommitdiff
path: root/middlewares/sessions.js
diff options
context:
space:
mode:
authorJulien Dessaux2022-11-21 21:39:17 +0100
committerJulien Dessaux2022-11-21 21:39:17 +0100
commit8ac636186cf5f704264e7473864c54b3edaf4049 (patch)
tree6f575d5b4dc5afc0c087e0467c4dd7d6e4a6dd6b /middlewares/sessions.js
parentcleaned up the distinction between routes and controllers (diff)
downloadjeux-de-mots-8ac636186cf5f704264e7473864c54b3edaf4049.tar.gz
jeux-de-mots-8ac636186cf5f704264e7473864c54b3edaf4049.tar.bz2
jeux-de-mots-8ac636186cf5f704264e7473864c54b3edaf4049.zip
Added basic games handling
Diffstat (limited to '')
-rw-r--r--middlewares/sessions.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/middlewares/sessions.js b/middlewares/sessions.js
index 6112a8c..8697ae0 100644
--- a/middlewares/sessions.js
+++ b/middlewares/sessions.js
@@ -3,7 +3,7 @@ import sqlite from "better-sqlite3";
import sqliteStore from "better-sqlite3-session-store";
const SqliteStore = sqliteStore(expressSession);
-const db = new sqlite("sessions.db", { verbose: console.log });
+const db = new sqlite("sessions.db", process.env.NODE_ENV === "production" ? null : { verbose: console.log });
const secret = process.env.SESSION_SECRET || "secret";
const session = expressSession({
cookie: {