Skip to content

Instantly share code, notes, and snippets.

@bennlich
bennlich / watchPosition(agent) NEW
Created September 4, 2012 20:29
problematic use of firebase api
function watchPosition(agent) {
agent.dataRef.child("coords").once("value", function(coords) {
if (coords.val()) {
console.log("Has coords!");
agent.dataRef.child("coords").on("value", function(coords) {
var lat = coords.child("lat").val();
var lon = coords.child("lon").val();
var patch = getPatchAt(lat, lon, 3);
if (patch) agent.setData("patch", patch.url);
@bennlich
bennlich / jitsufirebaselog
Created September 4, 2012 08:30
nodejitsu deploy error w/ firebase
info: Creating snapshot 0.1.0-28
info: Updating app agentcloud
info: Activating snapshot 0.1.0-28 for agentcloud
info: Starting app agentcloud
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
warn: Error returned from Nodejitsu
error: Error: connect ECONNREFUSED
error: at errnoException (net.js:768:11)
error: at Object.afterConnect [as oncomplete] (net.js:759:19)