<commit_before>module.exports = exports = factory;
exports.$implements = 'webServer';
exports.$inject = ['config', 'sensors', 'wsApi'];

function factory (services) {
	var express = require('express');
	var http = require('http');
	var config = services.config;

	var app = express();
	app.use(basicAuth());
	app.use('/sensor', services.sensors.app);
	app.get('/', redirectToUi);

	var server = http.createServer(app);
	services.wsApi.init(server);

	server.listen(config.webServerPort);

	return {<commit_msg>bind to endpoint<commit_after>module.exports = exports = factory;
exports.$implements = 'webServer';
exports.$inject = ['config', 'sensors', 'people', 'wsApi'];

function factory (services) {
	var express = require('express');
	var http = require('http');
	var config = services.config;

	var app = express();
	app.use(basicAuth());
	app.use('/sensor', services.sensors.app);
	app.use('/people', services.people.app);
	app.get('/', redirectToUi);

	var server = http.createServer(app);
	services.wsApi.init(server);

	server.listen(config.webServerPort);

	return {
{'fraction_non_alphanumeric': 0.17767441860465116, 'fraction_numerical': 0.0, 'mean_word_length': 5.5212121212121215, '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': '1169419', 'n_tokens_mistral': 344, 'n_tokens_neox': 331, 'n_words': 75}