DEV Community


Holy shit NW.js is so easy

The Jared Wilcurt
Cross-Platform Desktop App (XPDA) Engineer, Senior Frontend Web Developer. Maintainer of Scout-App. Editor of
・2 min read

Okay, so like.... you ready for this. Don't blink

1. Make an HTML5 file, it can even just be an empty file, called index.html
2. Make a package.json, you only need these 3 lines:

  "name": "my-first-desktop-app",
  "main": "index.html",
  "scripts": { "start": "nw" }

3. npm install --save-dev nw@sdk && npm start

That's it. You just made a desktop app. 🎉 🎊 ✨

Seriously, that was it. 2 files, 3 lines of code, and like 1-ish? maybe that's two commands? I don't know, it's freaking easy though.

Time yourself, see if you can do it in under 60 seconds. Post your times below. Always speedrun your hello worlds.

Oh, and you can also just do any Node stuff from the DOM directly. And the nw api is pretty easy-peasy.

<!DOCTYPE html>
    <title>My first desktop app</title>
      const fs = require('fs');

The Node and Chromium version it comes with is always the latest. Gets updated within 24 hours of a new release of either. So, you probably don't need Babel.

"But the filesize is gigantic?"

I gotchu homie

Any other downsides I should know about?

Why you gotta be so negative, can't you just be happy for me

For a more in-depth and beginner friendly tutorial on NW.js:

Discussion (0)