Node-Webkit demo app

YDN-DB todo list demo app built by Node-Webkit HTML5 desktop app platform.

Node-Webkit demo app

node-webkit is an app runtime based on Chromium and node.js. You can write native apps in HTML and JavaScript with node-webkit. 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.

Checkout pre-built binary application files for Windows and OS X.

Loading bundled data into the database

Applications often ship with some data. We can fetch required files from the server or we can bundle the data files together with the application. The following code snippet shows loading JSON data from a resource file into a YDN-DB database.

 var fs = require('fs');
 var obj;
 fs.readFile('./data.json', 'utf8', function (err, data) {
   if (err) throw err;
   var json = JSON.parse(data);
   db.put('todo', json);

Source code in Github


Kyaw Tun