Using instance name for local database.
This commit is contained in:
parent
e5a10d8059
commit
a946e0447b
|
@ -1,9 +1,11 @@
|
||||||
const knex = require('knex');
|
const knex = require('knex');
|
||||||
|
|
||||||
|
const instance = process.env.NODE_APP_INSTANCE || 'main';
|
||||||
|
|
||||||
module.exports = knex({
|
module.exports = knex({
|
||||||
client: 'better-sqlite3', // or 'better-sqlite3'
|
client: 'better-sqlite3', // or 'better-sqlite3'
|
||||||
useNullAsDefault: true,
|
useNullAsDefault: true,
|
||||||
connection: {
|
connection: {
|
||||||
filename: './clive.sqlite',
|
filename: `./${instance}.sqlite`,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue