<commit_before>var User = mongoose.model("User")
  , ImageList = mongoose.model("ImageList")
  , util = require('util')
  , PuSHHelper = require('node-push-helper').PuSHHelper;

module.exports = function (app) {

  // a GET request will be a challenge query
  app.get('/facebook/realtime', function(req, res){
    PuSHHelper.handshake(req, res);
  });
  
  // this is where Instagram will send updates (using POST)
  app.post('/facebook/realtime', PuSHHelper.check_signature, function(req, res){
    console.log("Data is " + util.inspect(req.body));
  });
}<commit_msg>better logging of incoming message<commit_after>var User = mongoose.model("User")
  , ImageList = mongoose.model("ImageList")
  , util = require('util')
  , PuSHHelper = require('node-push-helper').PuSHHelper;

module.exports = function (app) {

  // a GET request will be a challenge query
  app.get('/facebook/realtime', function(req, res){
    PuSHHelper.handshake(req, res);
  });
  
  // this is where Instagram will send updates (using POST)
  app.post('/facebook/realtime', PuSHHelper.check_signature, function(req, res){
    console.log("Data is " + util.inspect(req.body, false, null));
    res.send({meta: 200, message: "Received and understood."}, 200);
  });
}
{'fraction_non_alphanumeric': 0.1571313456889605, 'fraction_numerical': 0.004834810636583401, 'mean_word_length': 4.262711864406779, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3009968', 'n_tokens_mistral': 402, 'n_tokens_neox': 391, 'n_words': 95}