Post on 12-Jul-2015
node-webkit > browser
● user files● low level networking● frameless windows● node.js functions live in the rendering
thread● all script operations as user gesture● global access for local pages
layers
node-webkit app
node.js modulesjade, level, ...
web librariesjQuery, angular, ...
node.js nativecrypto, fs, ...
DOMwindow, GUM, ...
package.json{ "name": "countdown", "main": "index.html", "window": {
"frame": false,"width": 1000,"height": 125,
"title": "final countdown","icon": "link.png","toolbar": true,"position": "mouse","min_width": 400,"min_height": 200,"max_width": 800,"max_height": 600
}, "dependencies": { }}
build/start1. download node-webkit binary2. zip all of your assets
zip -r ../app.nw *
3. startnode-webkit app.nw
4. create a bundle:cat /usr/bin/nw app.nw > app && chmod +x app