client = arDrone.createClient(); client.disableEmergency(); ! navData = {} ! client.on('navdata', function(data){ navData = data; }); ! var server = http.createServer(function(req, res) { res.writeHead(200, {'Content-Type': 'application/json'}); res.end(JSON.stringify(navData)); }); ! server.listen(8080, function() { console.log('Serving latest png on port 8080 ...'); client.takeoff(); ! client .after(5000, function() { this.clockwise(0.5); }) .after(5000, function() { this.stop(); }) .after(1000, function() { this.stop(); this.land(); }); console.log('started server on http://192.168.1.1:8080') });