I'm searching some tutorial to setup a vue-electron(I'm using the vue-electron plugin) app with sqlite3 and knex.
dependency sqlite in package.json
here some configs from my vue.config.js
to initiate
module.exports = {
transpileDependencies: ["vuetify"],
configureWebpack: {
externals: {
knex: "require('knex')"
}
},
pluginOptions: {
electronBuilder: {
externals: ["sqlite3"],
builderOptions: {
extraResources: ["src/db/database.sqlite3"]
},
nodeModulesPath: ["../../node_modules", "./node_modules"]
}
}
};
I got the sqlite part working but is not clear how would I deal to open a connection, migrate and execute queries.
here is a structure what I try establish as screenshot
Where do I initiate the database, what would be an appropriate structure in this case