Using instance name for local database.

This commit is contained in:
Niels Simenon 2023-04-09 02:01:58 +02:00
parent e5a10d8059
commit a946e0447b
1 changed files with 3 additions and 1 deletions

View File

@ -1,9 +1,11 @@
const knex = require('knex');
const instance = process.env.NODE_APP_INSTANCE || 'main';
module.exports = knex({
client: 'better-sqlite3', // or 'better-sqlite3'
useNullAsDefault: true,
connection: {
filename: './clive.sqlite',
filename: `./${instance}.sqlite`,
},
});