Sign in

Full Stack Developer and Concept Designer (https://atiqgauri.github.io/)

Database for a electron app made with Dexie.js, which is a indexedDB wrapper.

Overview

We will cover-

  • Create dexie database
  • Running database in a worker
  • Import and export database
  • Make it persistent

Electron app and Dependencies

  1. take your electron app or clone this quick starter app
git clone https://github.com/electron/electron-quick-start
cd electron-quick-start
npm install

2. install dexie.js package
It is compatible with all modern browser and have a good community size.

npm install dexie --save

3. install dexie-export-import package
This package extends ‘dexie’ module with new methods for importing / exporting databases to / from blobs. …


Native addon will be made with Napi and Cmake. Napi makes it independent of node version and Cmake facilitate easy code compilation.
Web worker will be used to call c++ native addon, so we can be sure that our app UI will not get blocked because of c++ processes.

Requirement:

  1. install Node.js > 10.x

Note:- Remember to check automatically install the necessary tools while installing.
(this will be required to install vs-build tool on windows )

2. install Cmake > 3.15
( required for c++ code compilation )

Overview -

  1. get a quick electron app

2. make a native addon with…


This is a tutorial for c++ Node-addon-api / Napi addon using cmake.
Napi makes it independent of node.js version, means our addon will be compatible with all future version of node.js .
Cmake is a cross-platform code compiling tool for c++ code this makes us independent of complex node-gyp process.

Requirements :-

  1. install Node.js > 10.x

Note:- Remember to check automatically install the necessary tools.
(this will be required to install vs-build tool on windows )

2. install Cmake > 3.15

Overview -

  1. Napi addon require four major part
  • package.json file- to handle dependencies, names, version, installation commands etc.
  • CMakeLists.txt file- commands…


Git cheat sheet made with flow chart style for ease of reading
( you can write feedback/suggestions in comment section )

Updated: August 2020

Support my work

Buy Me A Coffee

Atiq Gauri

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store