<commit_before>var http = require('http');
var url = require('url');
var request = require('request');
var qs = require('qs');

var API_TOKEN = process.env.API_TOKEN;
var IP = process.env.IP || "localhost";
var PORT = process.env.PORT || 7777;

if (!API_TOKEN) {
  console.error("API_TOKEN=your_token_here node %s", __filename);
  console.error("https://developer.uber.com/v1/tutorials/#server-side-authentication");
  process.exit(1);
}

http.createServer(function (req, res) {
  var url_parts = url.parse(req.url, true);
  if (url_parts.pathname === '/favicon.ico') {
    res.writeHead(404);
    res.end();
    return;
  };

  if (!url_parts.query.latitude || !url_parts.query.longitude) {
    res.writeHead(408, {'Content-Type': 'application/json'});
    res.end(JSON.stringify({
      "message": "Missing parameters: latitude, longitude."
    }));
    return;
  };

  var params = {
    'server_token': API_TOKEN,
    'start_latitude': url_parts.query.latitude,
    'start_longitude': url_parts.query.longitude
  };
<commit_msg>Add access console.log<commit_after>var http = require('http');
var url = require('url');
var request = require('request');
var qs = require('qs');

var API_TOKEN = process.env.API_TOKEN;
var IP = process.env.IP || "localhost";
var PORT = process.env.PORT || 7777;

if (!API_TOKEN) {
  console.error("API_TOKEN=your_token_here node %s", __filename);
  console.error("https://developer.uber.com/v1/tutorials/#server-side-authentication");
  process.exit(1);
}

http.createServer(function (req, res) {
  console.log("%s GET %s", new Date().getTime(), req.url);
  var url_parts = url.parse(req.url, true);
  if (url_parts.pathname === '/favicon.ico') {
    res.writeHead(404);
    res.end();
    return;
  };

  if (!url_parts.query.latitude || !url_parts.query.longitude) {
    res.writeHead(408, {'Content-Type': 'application/json'});
    res.end(JSON.stringify({
      "message": "Missing parameters: latitude, longitude."
    }));
    return;
  };

  var params = {
    'server_token': API_TOKEN,
    'start_latitude': url_parts.query.latitude,
    'start_longitude': url_parts.query.longitude
  };

{'fraction_non_alphanumeric': 0.17589118198874296, 'fraction_numerical': 0.01125703564727955, 'mean_word_length': 4.164648910411622, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '2778656', 'n_tokens_mistral': 758, 'n_tokens_neox': 745, 'n_words': 138}