<commit_before>var express = require('express'),
    app = express(),
    cors = require('cors'),
    config = require('./config');

app.get('/version', function(req, res) {
    res.json({version:"0.0.0"});
});

var api = require("./api");
require('./bootstrapper').boot(config);

//Map the routes
api.init(app);

app.use(cors());

app.use(function(req, res, next) {
    res.setHeader("X-CommitStream-API-Docs", "https://github.com/eventstore/eventstore/wiki");
    return next();
});

app.get('/config.json', function(req, res) {
	var clientConfig = {
		assetDetailTemplateUrl : config.assetDetailTemplateUrl
	};
	res.json(clientConfig);
});

app.use(express.static(__dirname + '/client'));

app.listen(config.port, function () {
    console.log('CommitStream Web Server listening on port ' + config.port);
});<commit_msg>configure the app with to use cors before setting up the api routes.<commit_after>var express = require('express'),
    app = express(),
    cors = require('cors'),
    config = require('./config');

app.get('/version', function(req, res) {
    res.json({version:"0.0.0"});
});

var api = require("./api");
require('./bootstrapper').boot(config);

app.use(cors());

// Map API the routes
api.init(app);

app.use(function(req, res, next) {
    res.setHeader("X-CommitStream-API-Docs", "https://github.com/eventstore/eventstore/wiki");
    return next();
});

app.get('/config.json', function(req, res) {
	var clientConfig = {
		assetDetailTemplateUrl : config.assetDetailTemplateUrl
	};
	res.json(clientConfig);
});

app.use(express.static(__dirname + '/client'));

app.listen(config.port, function () {
    console.log('CommitStream Web Server listening on port ' + config.port);
});
{'fraction_non_alphanumeric': 0.1951934349355217, 'fraction_numerical': 0.0035169988276670576, 'mean_word_length': 4.471153846153846, 'pattern_counts': {'":': 0, '<': 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': '5065814', 'n_tokens_mistral': 551, 'n_tokens_neox': 552, 'n_words': 109}