<commit_before>'use strict';

/**
 * Imports.
 */
const express = require('express');

/**
 * Initialize Express.
 */
const app = express();

// Setup locals variable in config/index.js.
app.locals = require('./config');

// Configure express app based on local configuration.
app.set('env', app.locals.express.env);

/**
 * Routing.
 */
// Root:
app.get('/', (req, res) => {
  res.send('Hi, I\'m Blink!');
});

// Api root:
app.use('/api', require('./api'));

// API Version 1
app.use('/api/v1', require('./api/v1'));

/**
 * Listen.
 */
app.listen(app.locals.express.port, () => {
  app.locals.logger.info(`Blink is listening on port:${app.locals.express.port} env:${app.get('env')}`);
});

module.exports = app;<commit_msg>Print actual port number in server init log<commit_after>'use strict';

/**
 * Imports.
 */
const express = require('express');
const http = require('http');

/**
 * Initialize Express.
 */
const app = express();

// Setup locals variable in config/index.js.
app.locals = require('./config');

// Configure express app based on local configuration.
app.set('env', app.locals.express.env);

/**
 * Routing.
 */
// Root:
app.get('/', (req, res) => {
  res.send('Hi, I\'m Blink!');
});

// Api root:
app.use('/api', require('./api'));

// API Version 1
app.use('/api/v1', require('./api/v1'));

/**
 * Create server.
 */
const server = http.createServer(app);
server.listen(app.locals.express.port, () => {
  const address = server.address();
  app.locals.logger.info(`Blink is listening on port:${address.port} env:${app.locals.express.env}`);
});

module.exports = app;
{'fraction_non_alphanumeric': 0.22710163111668757, 'fraction_numerical': 0.0037641154328732747, 'mean_word_length': 3.596541786743516, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2776917', 'n_tokens_mistral': 546, 'n_tokens_neox': 546, 'n_words': 124}