<commit_before>var express = require('express');
var mongoose = require('mongoose');
var http = require('http');
var path = require('path');

var app = express();

app.configure(function() {
  app.use(app.router);
  app.use(express.errorHandler());
});

var User = require('./models/User');

app.get('/', function(req, res) {
  res.setHeader("Content-Type", "application/json");
  res.end(JSON.stringify({users: User.all()}));
});

var server = http.createServer(app);

server.listen(3000);
console.log("Running on port 3000");<commit_msg>index function<commit_after>var express = require('express');
var mongoose = require('mongoose');
var http = require('http');
var path = require('path');

var app = express();

app.configure(function() {
  app.use(app.router);
  app.use(express.errorHandler());
});

var User = require('./models/User');

app.get('/', function(req, res) {
  res.setHeader("Content-Type", "application/json");
  resUsers = {};
  User.find({}, function(err, users) {
    users.forEach(function(user) {
      resUsers[user._id] = user;
    });
  });
  res.send(JSON.stringify(resUsers));
});

var server = http.createServer(app);

server.listen(3000);
console.log("Running on port 3000");
{'fraction_non_alphanumeric': 0.20463960231980116, 'fraction_numerical': 0.013256006628003313, 'mean_word_length': 5.194871794871795, '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': '3530218', 'n_tokens_mistral': 401, 'n_tokens_neox': 391, 'n_words': 78}