Skip to content

Instantly share code, notes, and snippets.

@reconbot
Created July 18, 2014 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reconbot/37046cca84cf163b7c81 to your computer and use it in GitHub Desktop.
Save reconbot/37046cca84cf163b7c81 to your computer and use it in GitHub Desktop.
var circleNotifier = require('./circle');
var SparkStatus = require('./spark');
// later
app.use('/test', function(req,res,next){
console.log(req);
var ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress;
spark.write("Testing from:\n" + ip, function(err, retval){
res.end(JSON.stringify({err: err, retval: retval}));
});
spark.testBacklight();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment