This project was bootstrapped with Create React App.
This is a demo project for integrating SQLite with Electron. For UI, we are using React made with Create React App
I have created a blog which you can read as well, to get a better understanding of setting up better-sqlite3 with your Electron application.
Make sure you have Node.js installed. This project was developed and tested with Node.js v16.16.0. Higher versions might cause issues, so please fix any potential problems accordingly.
Clone the repository and navigate to the project directory:
git clone https://github.com/your-username/electron-betterSQLite.git
cd electron-betterSQLite
Install the dependencies:
npm install
In the project directory, you can run:
Run this initially before starting your project
If you face any error related to the DB file not being read, please run this command and then start the server again.
Runs the app in the development mode inside Electron Window.
The page will reload when you make changes.
You may also see any lint errors in the console.
Before deploying your Electron app, you need to package it for the target operating system.
Packages it for Windows OS for installation, as well as portable copy. Tested in Win 11.
Packages it for Mac OS for installation.
Packages it for Linux OS for installation.
Note: The Mac and Linux options are marked as Not Tested. you may need to make adjustments or test them for your specific use case.
Additional Notes
Customize the UI: You can modify the React components in the src folder to tailor the UI according to your needs.
Working with SQLite: The project already includes SQLite integration; explore the public/preload.js file to understand how it's connected to the Electron app.
Happy coding and learning!