<commit_before>'use strict';

var http = require('http');
var path = require('path');

var pkg    = require('./package.json');
var qforms = require('./qforms');
var server = require('./server');

var port = qforms.helper.getCommandLineParams().port || pkg.config.port;
var host = qforms.helper.getCommandLineParams().host || pkg.config.host;

var www = http.createServer(server);
www.on('error', function(err) {
    if (err.code === 'EADDRINUSE') {
        console.log('Error: address in use.');
    } else {
        console.log(err);
    }
});
www.listen(port, host, function() {
    console.log('QForms server listening on http://{host}:{port}, applications from {appsDirPath}'.template({
        host       : host,
        port       : port,
        appsDirPath: path.resolve(server.get('appsDirPath'))
    }));
});<commit_msg>show version on start<commit_after>'use strict';

var http = require('http');
var path = require('path');

var pkg    = require('./package.json');
var qforms = require('./qforms');
var server = require('./server');

var port = qforms.helper.getCommandLineParams().port || pkg.config.port;
var host = qforms.helper.getCommandLineParams().host || pkg.config.host;

var www = http.createServer(server);
www.on('error', function(err) {
    if (err.code === 'EADDRINUSE') {
        console.log('Error: address in use.');
    } else {
        console.log(err);
    }
});
www.listen(port, host, function() {
    console.log('QForms server v{version} listening on http://{host}:{port}, applications from {appsDirPath}'.template({
        version    : pkg.version,
        host       : host,
        port       : port,
        appsDirPath: path.resolve(server.get('appsDirPath'))
    }));
});
{'fraction_non_alphanumeric': 0.1780502043199066, 'fraction_numerical': 0.0, 'mean_word_length': 3.372448979591837, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, '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': '3353239', 'n_tokens_mistral': 524, 'n_tokens_neox': 520, 'n_words': 118}