<commit_before>"use strict";

var app    = require('koa')();
var router = require('koa-router');

var config = require('./config/config');

//Middleware: request logger
function *reqlogger(next){
  console.log('%s - %s %s',new Date().toISOString(), this.req.method, this.req.url);
  yield next;
}
app.use(reqlogger);

// Routes
require('./app/routes')(app);

// Start app
if (!module.parent) {
  app.listen(config.app.port);
  console.log('Server started on port: ' + config.app.port);
}
console.log('Environment: ' + config.app.env);
console.log('------ logging ------');<commit_msg>Changed port and environment handling.<commit_after>"use strict";

var app    = require('koa')();
var router = require('koa-router');

var config = require('./config/config');

//Middleware: request logger
function *reqlogger(next){
  console.log('%s - %s %s',new Date().toISOString(), this.req.method, this.req.url);
  yield next;
}
app.use(reqlogger);

// Routes
require('./app/routes')(app);

// Start app
if (!module.parent) {
  app.listen(process.env.PORT || config.app.port);
  console.log('Server started on port: ' + config.app.port);
}
console.log('Environment: ' + (process.env.NODE_ENV || config.app.env) );
console.log('------ logging ------');
{'fraction_non_alphanumeric': 0.21693548387096775, 'fraction_numerical': 0.0, 'mean_word_length': 4.106995884773663, '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': '3243292', 'n_tokens_mistral': 410, 'n_tokens_neox': 411, 'n_words': 88}