Wrap nodejs application with Phonegap
cordova, kraken.js, node.js
Solution
With Phonegap, you have a choice of either starting your application from a file local to your application (e.g. www/index.html) or a remote URL.
This is configured via the `<content>` tag in your www/config.xml file as such:
<content src="index.html" />
for a local file or
<content src="https://mydomain.com/myroute" />
for a remote URL.
If your application is available to non Phonegap users via a web browser and there is no difference between the Phonegap user experience and the regular browser one, it may be easier to point Phonegap directly to your kraken application's URL. You may also choose to implement different routes for Phonegap.
The reason is that you will only have to update your server template if you need to make a change after your Phonegap application has been pushed to the app store. Changing a file local to your application will require a Phonegap rebuild and redeploy.
Don't forget to specify the `<access origin>` parameter in your Phonegap configuration, for example:
<access origin="https://mydomain.com" subdomains="true" />
The downside of pointing directly to your server will be that you may have to load cordova.js on all your pages (maybe using conditional loading tricks). (See comment below by grundyoso for a better solution)
Problem
I would like to wrap my nodejs application using phonegap. I built my nodejs application using krakenjs and I don't really know which files should go into phonegap. Nodejs is the server side but it serves all the static files. In my public folder under the krakenjs project I have all the static files (css, imgs, js .. ) but all the html are dustjs template files which the server serves. I am kind of lost. any help would be appreciated. Thanks!