Meteor and node-webkit make for an incredibly powerful combination, because they allow you to:
- rapidly develop a desktop app with meteor/js/html/css goodness
- dynamically update your app after shipping it to the user
- fully use the node API on a user's machine
You could probably use these two technologies in a few ways including:
- a fairly static app which talks to a remote server via DDP
- a completely dynamic app which receives all of its code every time it starts (see below)
- a self-hosted meteor server on the user's machine (I have not tried this approach)
Here is an example package.json
which demonstrates how to load your app completely dynamically (just like a web page) from myapp.example.com
:
{
"name": "myApp",
"node-remote": "myapp.example.com",
"main": "https://myapp.example.com/",
"version": "0.0.1",
"window": {
"icon": "logo.png",
"toolbar": false,
"frame": true,
"resizable": false,
"position": "center",
"width": 500,
"height": 500
}
}
There are a couple of things I'll caution you about:
While the application code can be updated at any time, if you require node modules or other libraries, you will need to package those ahead of time along with the nw
binary. For example, if you want your users to be able to view h264 video, you'll need to ship with the necessary libraries.
If you load your application code from the internet, be aware of the potential dangers. If someone were to gain control of your DNS or your servers, all of your users could have a really bad day. The proper way to deal with this is to sign your application code before it can be loaded by node-webkit but that's beyond the scope of this answer.