This tutorial steps through creating a simple hello world style application and then using node-webkit to package and run it on OS X.
Full source code can be downloaded from here.
Download node-webkit from here: https://github.com/rogerwang/node-webkit
Download the latest version of jQuery from here: http://jquery.com/
Step 1- Create our Hello World web application
What we want is quite simple, a button that has a click event that updates a label.
Let's get started with some HTML, create a file called index.html and populate it with this html:
Now open index.html and press the button:
Not very exciting, but it can be seen here that it's working and running in Safari.
Step 2 - Bundle our web application as a node-webkit application
To create a node-webkit application we need to create one further file called package.json:
Now we have four files in our directory:
Create a ZIP file with the above four files and call it HelloWorld.nw.
Copy the node-webkit application into the above project directory and run it:
And there we go - our Hello World application running on OS X - source code for this demo here.
For more information on running and packaging the application see these links: