Tech by VICE

Nativefier Will Instantly Convert Any Web Page Into a Desktop Program

Including this one.

by Michael Byrne
Jan 23 2016, 2:30pm

Image: Nativefier

Despite the ever-increasing capabilities of web pages most of us probably still tend to think of them as things that live within browsers and that do typical old-school website stuff, much of which consists of just sitting there displaying some combination of links, text, and images. The growth and development of JavaScript and its myriad extensions has, however, heralded in a chaotic new age—the era of the web application. A URL now might reveal what amounts to a fully realized computer program. A canonical example would be Google Maps.

As web apps have progressed to this point, developers have been trying to break web applications loose from the web. JavaScript applications are able to ditch the browser thanks to the Node.js platform, a runtime environment that allows JavaScript to run within a normal computer operating system rather than merely a browser. It's commonly used to build JS-based web servers in place of PHP.

Read more: In Defense of JavaScript (the Hard Way)

Nativefier is based on the Node.js runtime, but it goes a few steps further, allowing for quick and automated conversions from regular old web sites to stand-alone desktop applications. You could right now make this site into a piece of software. In fact, I just did.

Nativefier does this thanks to a framework called Electron, which enables programmers to write desktop applications in JavaScript, HTML, and CSS. Nativefier first automatically creates a template of the target website and feeds this into Electron, which then "wraps" the template with all of the required stuff to make an .exe or .app file, using a browser window to render the HTML.

Nativefier is plenty user-friendly: it runs from the Node.js command line simply as "nativefier ''." (There are some additional options that can be specified, but that's all explained in Nativefier's brief documentation.) World, meet PornHub.exe.