GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - francisrc/angular5-electron-sqlite3-bootstrap4-webpack: An Electron application using Angular 5+, Sqlite3, Bootstrap 4 and WebPack

BranchesTags
Open more actions menu

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
config
config
 
 
src
src
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
index.js
index.js
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 
tslint.json
tslint.json
 
 

Repository files navigation

Sample application using Angular 5, Electron, SQLite and Bootstrap 4 (beta2)

It took me quite some time to figure out how to use SQLite database in an Electron application. Because of the difficulties I've encountered, I've been using sql.js and Lovefield as alternatives.

  • sql.js is SQLite compiled to javascript and therefore easy to integrated.
    The disadvantage is that it loads the entire database in memory at startup and needs to be written back to disk when the app finishes.
  • lovefield is also build in Javascript, but stores the data in the browser's IndexedDb. It does not use SQL, but its own api.
    My main issues with lovefield are that I needed more complex sql statements and needed to be able to store the database anywhere on disk.

None of the above was satisfactory, so I continued the search to bundle SQLite and finally found a way to access SQLite from Electron/node and overcome bundling issues with webpack.

This repository is a stripped down Electron application using Angular 5, SQLite, Bootstrap 4 and WebPack.

Note Since I develop solely on Windows 10, I have not tested the application on any unix version.

Prerequisites (Windows 10)

Both Visual C++ Build Tools and Python 2.7 are required for node-gyp to rebuild native SQLite library for node.
For installation instructions see node-gyp.

Quickstart

  1. git clone https://github.com/pamtbaau/angular5-electron-sqlite3-bootstrap4-webpack.git
  2. npm install
  3. npm run build:once
  4. npm start
    • Enter new database name in file dialog.

Karma tests

  • npm run test

Building installable exe

  • npm run package

Notes

  • Application can switch between a fixed database location or allow the end-user to select a location at first startup.
    See src/app/model/Settings.hasFixedDbLocation
  • While developing, settings.json (points to database location) is located in c:/users/yourname/AppData/Roaming/$productName}-dev
    When running packaged executable, settings.json is located in c:/users/yourname/AppData/Roaming/$productName}. This way development will not override production data.
  • TheDb provides a Promise-ified wrapper around bare sqlite3 API.

About

An Electron application using Angular 5+, Sqlite3, Bootstrap 4 and WebPack

Resources

Readme
GPL-3.0 license
Activity

Stars

0 stars

Watchers

0 watching

Forks

15 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.