Home

Awesome

micro-app-electron-launcher

This project provides a launcher for applications built with the micro-app framework (https://github.com/mhdawson/micro-app-framework) using electron (http://electron.atom.io/). This provides the following advantages over simply opening the applications in a brower:

This is an example of the visual difference:

electron/non-electron visual comparison

Of course you can access the same micro app using either the electron launch method or a brower so you can have a native look and feel on some machines and still be able to remotely access the app from other machines with only the browser installed.

Installation

You will need Node.js 4.X or higher installed on on the path.

The easiest way is to install is using:

<PRE> npm install micro-app-electron-launcher </PRE>

Alternatively you can clone this repo and then run npm install.

Configuration

To configure the micro-apps started you specify them in the file called config.json.

For example this is my config :

<PRE> { "apps": [ { "name": "home dashboard", "hostname": "X.X.X.X", "port": "8081", "options": { "x": 3350, "y": 10, "resizable": false } }, { "name": "phone", "hostname": "X.X.X.X", "port": "8083", "options": { "x": 15, "y": 1850, "sizable": false } }, { "name": "Alert Dashboard", "hostname": "X.X.X.X", "port": "8084", "options": { "x": 3065, "y": 10, "sizable": false } }, { "name": "totp", "tls": true, "hostname": "X.X.X.X", "port": "8082", "auth": "asdkweivnaliwerld8welkasdfiuwerasdkllsdals9=", "options": { "x": 2920, "y": 10, "sizable": false } } ] } </PRE>

The values you can configure for each micro-app are as follows:

The script lib/enc_config_value.js can be used to encrypt a configuration value as follows:

<PRE> node lib/enc_config_value.js value mypassword </PRE>

The value provided for 'value' should be the username and password required by the micro-app separated by a ':' character. For example:

<PRE> node lib/enc_config_value.js "user1:pass1" mypassword </PRE>

Running

To run use:

<PRE> npm start </PRE>

You will be prompted for a password that must match the one used to encrypt any of the "auth" values in config.json

Notes

It seems the prompt module does not work on windows. I've hacked my install to prompt for the password in a different way and should check in something better soon.