check if app is running electron or node code example
Example 1: how to check whether we are running on electron or browser
npm install --save is-electron
Example 2: how to check whether we are running on electron or browser
let isElectron = require("is-electron");
if(isElectron()){
console.log("Electron aww yeahhh !");
}else{
console.log("Running in other platform as a normal browser");
}