Wynn Netherland changelog.com/posts

Node.js on your (jailbroken) iPhone

Nathan “Too Tall” Rajlich has gotten
Node.js to run his jailbroken iPhone 4. If you’ve got SSH access on a
jailbroken phone, simply extract the .deb package:

dpkg -i node-v0.4.5-ios-arm-1.deb

Now you can see if Node is running:

$ node
> require('os').cpus()
[ { model: 'N90AP',
    speed: 0,
    times: 
     { user: 9209240,
       nice: 0,
       sys: 6997410,
       idle: 255377220,
       irq: 0 } } ]

Nate has created node-iOS to
play with iOS-specific functionality with Node bindings:

var iOS = require('iOS');

iOS.vibrate();
// Quick vibrate, like when you receive text message

if (iOS.compass.available) { // true if the iDevice has a digital
compass
  iOS.compass.on('heading', function(heading) {
    console.log(heading.magneticHeading); // Degrees relative to
magnetic north
  });
}

Of course if you want to play with Node on mobile without
jailbreaking your phone, Node.js powers the JavaScript services in
WebOS
.

[Source on GitHub] [Blog post]


Discussion

Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00