Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running JavaScript app outside of the browser [closed]

Tags:

I have a couple of little widgets that I have made to run in the browser, just basic JavaScript and HTML. They are little tools that have blank backgrounds and things like CPU usage, and just little toys like that.

I originally developed these tools to live on a web page as components of a view on a web site. Is there a way that I can bring these outside the browser such as Chrome, and just have my CPU usage app overlay my desktop so I can still see stuff behind it such as when a movie is playing, or playing a video game? Perhaps even launch a javascript only program that runs AS A DESKTOP application?

It is fine to depend on the browser as long as I can have this app over my desktop or run as a stand alone Node.js application. How is this done? I recently heard that desktop applications such as Discord do things much like this with voice comms and have overlays in games.

like image 811
Travis Tubbs Avatar asked Mar 04 '16 00:03

Travis Tubbs


1 Answers

As a website, the answer is no. However you can create a Node app, and that can run as a normal executable.

I believe Spotify, and Slack (at the time of writing) are good examples of a Node wrapped application.

A few options:

These project have some serious star counts on github.

Electron

The Electron framework lets you write cross-platform desktop applications using JavaScript, HTML and CSS. It is based on Node.js and Chromium.

Github's Atom editor is built using Electron.

Slack uses Electron as well.

Electron's official site

node-webkit

NW.js is an app runtime based on Chromium and node.js. You can write native apps in HTML and JavaScript with NW.js. It also lets you call Node.js modules directly from the DOM and enables a new way of writing native applications with all Web technologies.

The unofficial Facebook Messenger for Desktop is built using node-webkit.

Other cool projects:

  • AppJS
  • Sciter
  • TideSDK
like image 193
MrHaze Avatar answered Sep 29 '22 10:09

MrHaze