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 WebOS.

[Source on GitHub] [Blog post]

News Films

Our little film studio focuses on telling developer-centric stories that need to be seen.

Beyond Code: Season 3 / GopherCon 2015

0:00 / 0:00