nw.js README

The project's README from github.com/nwjs/nw.js. As one markdown file: README.md.

node-webkit is renamed NW.js

Gitter
Official site: https://nwjs.io

Introduction

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.

It was created in the Intel Open Source Technology Center.

Building a Cross-platform Desktop App with NW.js
Creating Desktop Applications With node-webkit
WebApp to DesktopApp with node-webkit (slides)
Essay on the history and internals of the project

Features

Downloads

Demos and real apps

You may also be interested in our demos repository and the List of apps and companies using nw.js.

Quick Start

Create index.html:

<!DOCTYPE html>
<html>
  <head>
    <title>Hello World!</title>
  </head>
  <body>
    <h1>Hello World!</h1>
    We are using node.js <script>document.write(process.version)</script>.
  </body>
</html>

Create package.json:

{
  "name": "nw-demo",
  "version": "0.0.1",
  "main": "index.html"
}

Run:

$ /path/to/nw .  (suppose the current directory contains 'package.json')

Note: on Windows, you can drag the folder containing package.json to nw.exe to open it.

Note: on OSX, the executable binary is in a hidden directory within the .app file. To run node-webkit on OSX, type:
/path/to/nwjs.app/Contents/MacOS/nwjs . (suppose the current directory contains 'package.json')

Documents

Official documentation: http://docs.nwjs.io/

For more information on how to write/package/run apps, see:

And our Wiki for much more.

Community

We use the google group as our mailing list (use English only). Subscribe via [email protected].

NOTE: Links to the old google group (e.g. https://groups.google.com/forum/#!msg/node-webkit/doRWZ07LgWQ/4fheV8FF8zsJ) that are no longer working can be fixed by replacing node-webkit with nwjs-general (e.g https://groups.google.com/forum/#!msg/nwjs-general/doRWZ07LgWQ/4fheV8FF8zsJ).

Issues are being tracked here on GitHub.

The source code for NW.js and the daily development spans multiple repositories in this organization. This repository is for issue tracking, landing page, and part of the source code.

Verifying Binaries

Starting from 0.32.0 the stable and nightly download directories contain a SHASUMS256.txt file that lists the SHA checksums for each file available for download, as well as the checksums for the files inside the download package.

The SHASUMS256.txt can be downloaded using curl.

$ curl -O https://dl.nwjs.io/vx.y.z/SHASUMS256.txt

To check that a downloaded file matches the checksum, run it through sha256sum with a command such as:

$ grep nwjs-vx.y.z.tar.gz SHASUMS256.txt | sha256sum -c -

The stable releases (but not Nightlies) also have the GPG detached signature of SHASUMS256.txt available as SHASUMS256.txt.asc. You can use gpg to verify that SHASUMS256.txt has not been tampered with.

To verify SHASUMS256.txt has not been altered, you will first need to import the GPG key of NW.js maintainer to create releases. Use this command to import the key:

$ gpg --keyserver pool.sks-keyservers.net --recv-keys 78680FA9E21BB40A
(Key fingerprint is 1E8B EE8D 5B0C 4CBC D6D1  9E26 7868 0FA9 E21B B40A)

Next, download the SHASUMS256.txt.asc for the release:

$ curl -O https://dl.nwjs.io/vx.y.z/SHASUMS256.txt.asc

After downloading the appropriate SHASUMS256.txt and SHASUMS256.txt.asc files, you can then use gpg --verify SHASUMS256.txt.asc SHASUMS256.txt to verify that the file has been signed by an authorized member of the NW.js team.

Once verified, use the SHASUMS256.txt file to get the checksum for the binary verification command above.

License

NW.js's code in this repo uses the MIT license, see our LICENSE file. To redistribute the binary, see How to package and distribute your apps

nw.js (nwjs/nw.js)

Searching Database…

41.1K ·GitHub
这是什么?NW.js 是一个基于 Chromium 和 Node.js 的应用运行时,可以让你用 HTML、CSS 和 JavaScript 编写原生桌面应用,并直接从 DOM 中调用 Node.js 模块。
它是浏览器、框架,还是别的什么?它是一个运行时:它把 Chromium 和 Node.js 打包进同一个进程,让你的 Web 应用变成桌面可执行程序,而不是需要导入到其他应用中的库。
怎么让一个基础应用跑起来?在一个文件夹里创建 index.html 和 package.json,然后用 nw/nwjs 二进制文件运行该文件夹(在 Windows 上也可以把文件夹拖到 nw.exe 上)。
我需要单独安装 Node.js 或 Chromium 吗?不需要,你只需下载适用于你操作系统的 NW.js 预编译二进制文件,它已经内置了自带的 Node.js 和 Chromium 版本。
我怎么知道下载的二进制文件没有被篡改?稳定版发布时会附带 SHA256 校验值文件 SHASUMS256.txt,以及经 GPG 签名的 SHASUMS256.txt.asc。你可以用 sha256sum 和 gpg,结合维护者已导入的密钥进行验证。
它能在哪些操作系统上运行?Linux(64bit/arm64)、Windows(32bit/64bit)和 Mac OS X 10.10+(64bit),另外还为 Windows XP 和早期 OSX 提供单独的 Legacy 版本。
为什么要用 NW.js,而不是在浏览器里写普通的 Web 应用?NW.js 允许在 DOM 中完整访问 Node.js API,因此 Web 应用可以读写文件、启动进程,并直接使用原生 npm 模块,而这些都是普通浏览器沙箱所禁止的。
它支持第三方 npm 模块吗?支持,它在应用的网页中完整支持 Node.js API 及其所有第三方模块。
有 SDK 版本吗?我为什么要用它?有的,发布说明中提到了单独的 SDK 版本,通常用于开发,因为它包含普通发布版中没有的开发者工具和调试支持。
在哪里可以看到用它做的真实应用?项目维护着一个 demos 仓库,以及一份使用 NW.js 的应用和公司精选列表。
Creator
nwjs
Size
133.9 MB
Stars
41.1K
Updated
CommitOct 10
Age
14y
Commits · 90 Days