Supported account types: Accounts in my organizational directory only (single tenant).Use the following settings for your app registration: Visual Studio Code or another code editorįirst, complete the steps in Register an application with the Microsoft identity platform to register your app.Register the application in the Azure portal.IPC is only required if you want to manipulate windows or trigger anything else on the main process from the renderer process. You don't really need to use IPC for things like working with files or databases because those APIs are available in the preload. This.#db = new sqlite3.Database("testing.db", sqlite3.OPEN_READWRITE) Īnd I can call this and do whatever no problem from the Electron entry point index.js: const, which is why I said almost sure. Here's my simple database manager class: const sqlite3 = require("sqlite3").verbose() Since everything is local it would seem it shouldn't be necessary to set up a whole API just to marshal data back and forth, but maybe it is? But if so, how does one go about telling the Electron "backend" (if that's the right term) to do something and return the results to the front end? I'm seeing something about IPC but that's not making a lot of sense right now and seems like overkill. But from the front-end (I am using Svelte, but I can probably translate solutions from other front-end frameworks), how does one interact with the database? This seems fundamental but I'm striking out trying to find a basic example. How does one interact with a local database (I am using Sqlite) from an Electron application front end? I have a very basic database manager class and have no problem using it from the index.js file in my Electron application. (Brand new learning Electron here, so I'm sure this is a basic question and I am missing something fundamental.)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |