diff options
author | Julien Dessaux | 2023-01-01 23:23:57 +0100 |
---|---|---|
committer | Julien Dessaux | 2023-01-02 20:26:28 +0100 |
commit | 3acf783d948ebb1907da875ef87b0da9ef2309ff (patch) | |
tree | 06b805fab10e638a9f5e66714ef4a29b6409c1e7 /database | |
parent | Refactored game creation (diff) | |
download | jeux-de-mots-3acf783d948ebb1907da875ef87b0da9ef2309ff.tar.gz jeux-de-mots-3acf783d948ebb1907da875ef87b0da9ef2309ff.tar.bz2 jeux-de-mots-3acf783d948ebb1907da875ef87b0da9ef2309ff.zip |
Began adding tests
Diffstat (limited to 'database')
-rw-r--r-- | database/db.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/database/db.js b/database/db.js index a360e9b..1e8b50d 100644 --- a/database/db.js +++ b/database/db.js @@ -6,7 +6,10 @@ const allMigrations = [ "database/001_games.sql", ]; -const db = new Database("jdm.db"); +const db = new Database( + process.env.NODE_ENV === "test" ? "testjdm.db" : "jdm.db", + process.env.NODE_ENV === "development" ? { verbose: console.log } : null +); db.pragma("foreign_keys = ON"); db.transaction(function migrate() { |