add DATABSE_PATH

This commit is contained in:
Henry
2023-06-22 16:22:12 +01:00
parent 6d931caf91
commit 4a63b68bbe
+1 -1
View File
@@ -128,7 +128,7 @@ export class ChildProcess {
* @returns {DataSource} * @returns {DataSource}
*/ */
async function initDB() { async function initDB() {
const homePath = path.join(getUserHome(), '.flowise') const homePath = process.env.DATABASE_PATH ?? path.join(getUserHome(), '.flowise')
const childAppDataSource = new DataSource({ const childAppDataSource = new DataSource({
type: 'sqlite', type: 'sqlite',
database: path.resolve(homePath, 'database.sqlite'), database: path.resolve(homePath, 'database.sqlite'),