<commit_before>var express = require('express'),
    app = express();

app.get('/search', function (req, res) {
    //TODO start java app using lucene with req.query.q
    res.send(200);
});

app.listen(8080);<commit_msg>* Returning mock data from the search service<commit_after>var express = require('express'),
    app = express();

app.use(function (req, res, next) {
   res.header("Access-Control-Allow-Origin", "http://localhost:9000");
   res.header("Access-Control-Allow-Headers", "X-Requested-With, Content-Type, Accept");
   res.header('Access-Control-Allow-Credentials', true);
   res.header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');
   next();
});

app.get('/search', function (req, res) {
    res.json({
        "books": [
            {
                "title": "<NAME>",
                "image": "http://example.com/image.png",
                "relevance": "0.77"
            }, {
                "title": "Withering Heights",
                "image": "http://example.com/image2.png",
                "relevance": "0.54"
            }, {
                "title": "The Picture of <NAME>",
                "image": "http://example.com/image3.png",
                "relevance": "0.36"
            }   
        ]
    });
    res.send(200);
});

app.listen(8080);
{'fraction_non_alphanumeric': 0.18489984591679506, 'fraction_numerical': 0.02234206471494607, 'mean_word_length': 2.1682926829268294, 'pattern_counts': {'":': 10, '<': 5, '<?xml version=': 0, '>': 5, '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': '612645', 'n_tokens_mistral': 426, 'n_tokens_neox': 396, 'n_words': 79}