The Changelog

Open Source moves fast. Keep up.

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,
     { 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');

// Quick vibrate, like when you receive text message

if (iOS.compass.available) { // true if the iDevice has a digital
  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

[Source on GitHub] [Blog post]

Have comments? Send a tweet to @TheChangelog on Twitter.

Subscribe to The Changelog Weekly – our weekly email covering everything that hits our open source radar.