I have an electron app which uses a database opened with the following code:
const fs = require("fs")
const sqlite = require("aa-sqlite")
await sqlite.open('cregr_db.db');
My package.json contains :
"build": {
"appId": "crergr",
"linux": {
"target": [
"AppImage"
],
"icon": "icon512.png"
},
"win": {
"target": "NSIS",
"icon": "icon256.ico"
},
"extraFiles": [
"cregr_db.db"
]
},
the cregr_db.db is in the same folder as my *js, index.html and style.css. Everything runs fine when launched from the root directory of my app.
If I run the app image from elsewhere, I have an exception when I query the database and, in fact, the database file is not displayed in the file hierarchy. I can not post an image here but you can find one at http://alainbe.free.fr/files.png What I am doing wrong ? Thanks for your help.