streembit / streembitui

Decentralized, P2P communication system
GNU General Public License v3.0
13 stars 9 forks source link

Streembit User Interface (UI) Application

The Streembit User Interface (UI) application using the same code base can be executed either as a desktop application using the NW.js framework or as a standalone web application using a web server.

For both mode clone the repository

$ git clone https://github.com/streembit/streembitui
$ cd /streembitui

Install the Streembit Node.js dependencies:

$ npm install

The Streembit UI application uses the jspm module loader. Please refer to the jspm.md readme file which explains installing and configuring jspm.

Once jspm is configured enter

$ jspm install

Option No. 1: Run the Streembit UI as a desktop application

You can download the latest NW.js framework from their repository at https://github.com/nwjs/nw.js.

Alternatively, if you wish to build Chromium from source please refer to the Chromium project web site.

Build summary

Get the Chromium code

Windows build instructions

To build NW.js from source please refer to the NW.js build documentation.

Once NW.js is downloaded or built you must create a config.app.json configuration file in the lib folder, the same location where the config.json file is placed. Define the following to the config.app.json

{
    "nwmode": true,
    "protocol":  "https"
}

The nwmode indicates whether or not run execute the software as a nwjs desktop application. The nwmode = true will run the application as a nwjs desktop app.

Must define "https" at the "protocol" field to run the web application over the HTTPS protocol.

Run Streembit:

$ /path/to/nw . 

Note, the node-webkit executables must be in the /nw directory if you run the above command. The package.json file must exists in the Streembit directory.


Option No. 2: Run the Streembit UI as a website

The application can be executed as as website. Perform the following steps to run it as website.

You must create a config.app.json configuration file in the lib folder, the same location where the config.json file is placed. Define the following to the config.app.json

{
    "nwmode": false,
    "protocol":  "https"
}

Pleae note, the nwmode variable is false in the config.app.json file to run the Streembit UI as a web application. We run Streembit via the web using NGINX, but any web server should be able to serve the content. For development purpose it is the easiest to use the http-server nodejs application to run Streembit as a website.