Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
TxJS sample code of Enyo app showing a fortune cookie service
JavaScript CSS
branch: master
Failed to load latest commit information.
assets Moved needed files to assets, changed to app's main icon to icon.png,…
enyo @ e7ad938 added enyo submodule
lib added enyo submodule
package Updated to use node webos-service module and LGE as vendor
services/com.palmdts.txjsfortune.service Updated deploy scripts to use ares-package and syntax bugfix in lunas…
source Added extra commenting
tools Add build.sh, and chmod +x tools/deploy.sh
.gitignore Updated deploy scripts to handle 1 (or more) services, with improved …
.gitmodules Moved needed files to assets, changed to app's main icon to icon.png,…
.jshintignore Restructured to have app in base directory; the minified output direc…
.jshintrc Restructured to have app in base directory; the minified output direc…
LICENSE Add BSD-style license
README.md Add README markdown file for repo
appinfo.json Moved needed files to assets, changed to app's main icon to icon.png,…
build.sh Add build.sh, and chmod +x tools/deploy.sh
debug.html Moved needed files to assets, changed to app's main icon to icon.png,…
deploy.json Updated deploy scripts to handle 1 (or more) services, with improved …
icon.png Moved needed files to assets, changed to app's main icon to icon.png,…
index.html Restructured to have app in base directory; the minified output direc…
package.js Restructured to have app in base directory; the minified output direc…

README.md

This is the sample code for Ben Combee's presentation on Enyo and Node.js at the TXJS 2011 confernece.

You can see the slides for this talk at http://www.slideshare.net/unwiredben/javascript-on-hp-webos-enyo-and-nodejs

This is a simple Enyo application showing a fortune cookie application. It has three implementations of the "get next fortune" code.

  • LocalFortunes.js: hard-coded messages in the JS file
  • FortuneJar.js: reads the messages file in the Enyo app using a enyo.WebService request
  • FortuneService.js: asks a fortune cookie service implemented in node.js for a fortune

The implementation that's used is selected by the commented-out code in app.js.

We supply a build.cmd for building the package on Windows. This can be easily modified into a build.sh file for Mac OS X or Linux.

You'll need the HP webOS 3.0 SDK, a free download at http://developer.hpwebos.com/ to build this and test it. This will run fine in the HP webOS 3.0 emulator or on a HP TouchPad device.

Something went wrong with that request. Please try again.