Skip to content

Commit

Permalink
DB file path
Browse files Browse the repository at this point in the history
  • Loading branch information
tomt1664 authored Mar 11, 2024
1 parent 9848842 commit 3fd146a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion clients/react-app/src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ app.whenReady().then(async () => {

try {
// where to put that code?
const appDataPath = app.getPath('appData');
const databaseFile = 'wallet.db' // config.get('databaseFile')
db = new sqlite3.Database(databaseFile)
const dbFilePath = path.join(appDataPath, databaseFile)
db = new sqlite3.Database(dbFilePath)
await sqliteManager.createTables(db)
} catch (error) {
console.log('Database intialization Error:', error)
Expand Down

0 comments on commit 3fd146a

Please sign in to comment.