<commit_before>#!/usr/bin/env node

var express = require('express');
var server = express.createServer();
var carmen = new (require('./index.js'))();

server.get('/geocode/:query', function(req, res, next) {
    if (!req.param('query')) return res.send(404);
    console.time('geocode ' + req.param('query'));
    carmen.geocode(req.param('query'), function(err, data) {
        console.timeEnd('geocode ' + req.param('query'));
        if (err) return next(err);
        res.send(data);
    });
});

server.use(express['static'](__dirname + '/static'));

server.listen(3000);<commit_msg>Message when server has started.<commit_after>#!/usr/bin/env node

var express = require('express');
var server = express.createServer();
var carmen = new (require('./index.js'))();

server.get('/geocode/:query', function(req, res, next) {
    if (!req.param('query')) return res.send(404);
    console.time('geocode ' + req.param('query'));
    carmen.geocode(req.param('query'), function(err, data) {
        console.timeEnd('geocode ' + req.param('query'));
        if (err) return next(err);
        res.send(data);
    });
});

server.use(express['static'](__dirname + '/static'));

server.listen(3000);
console.log('carmen: http://localhost:3000')
{'fraction_non_alphanumeric': 0.21175523349436393, 'fraction_numerical': 0.014492753623188406, 'mean_word_length': 4.2893617021276595, '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': '5338035', 'n_tokens_mistral': 417, 'n_tokens_neox': 407, 'n_words': 75}