Introduction

In the following paragraphs you'll learn how we can set up Electron app on Gateway. Electron is  a framework for building desktop applications using JavaScript , HTML , and CSS. Since Electron  embeds Chromium  to run following solution it's recommended to connect to environment via NoMachine.

Install node.js 

The current recommended way to install node.js  is through the usage of modules. In order to do that follow steps given bellow:

  1. Execute following command:
    module use /pfs/work/g2pbloch/imasenv_eb/modules/all
  2. Load module with node.js:
    module load nodejs/20.9.0-GCCcore-12.2.0
  3. Load additional modules required by Electron on Gateway:
    module load Mesa/22.2.4-GCCcore-12.2.0
    module load DBus/1.15.2-GCCcore-12.2.0
    module load NSS/3.85-GCCcore-12.2.0

Install Electron 

After installing node.js  inside your SDCC  environment it's time to set up Electron example project. To do that follow steps given bellow:

  1. Clone repository with Electron sample:
    git clone https://github.com/electron/electron-quick-start
  2. go to Electron  directory
  3. execute following commands:
    npm install electron --save-dev
    chmod 4755 node_modules/electron/dist/chrome-sandbox
    npx electron . --no-sandbox