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

var app = express();

var dbPath = 'mongodb://localhost/sagedb';

// Configuration of the SAGE Express server
app.configure(function () {
  app.use(express.bodyParser());
  app.use(express.methodOverride());
  app.use(app.router);

  // app.use(express.static(path.join(__dirname, "public")));
  // app.use('/uploads', express.static(path.join(__dirname, "uploads")));
  // app.use('/extjs', express.static(path.join(__dirname, "extjs")));
  // app.use('/geoext', express.static(path.join(__dirname, "geoext")));
  app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));

  mongoose.connect(dbPath, function(err) {
    if (err) throw err;
  });

  app.use(function(err, req, res, next){
    console.log('WLN - not good, something bad happened ')
    console.error(err.stack);
    res.send(500, 'Something broke!');
  });
});

// Import models
var counters = require('./models/counters')(mongoose);
var models = {
  Feature: require('./models/feature')(mongoose, counters),
  Team: require('./models/team')(mongoose),
  ObservationLevel: require('./models/observationlevel')(mongoose),
  ObservationType: require('./models/observationyype')(mongoose)<commit_msg>fixed typo on model require.<commit_after>var express = require("express");
var mongoose = require('mongoose');
var path = require("path");
var fs = require('fs');

var app = express();

var dbPath = 'mongodb://localhost/sagedb';

// Configuration of the SAGE Express server
app.configure(function () {
  app.use(express.bodyParser());
  app.use(express.methodOverride());
  app.use(app.router);

  // app.use(express.static(path.join(__dirname, "public")));
  // app.use('/uploads', express.static(path.join(__dirname, "uploads")));
  // app.use('/extjs', express.static(path.join(__dirname, "extjs")));
  // app.use('/geoext', express.static(path.join(__dirname, "geoext")));
  app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));

  mongoose.connect(dbPath, function(err) {
    if (err) throw err;
  });

  app.use(function(err, req, res, next){
    console.log('WLN - not good, something bad happened ')
    console.error(err.stack);
    res.send(500, 'Something broke!');
  });
});

// Import models
var counters = require('./models/counters')(mongoose);
var models = {
  Feature: require('./models/feature')(mongoose, counters),
  Team: require('./models/team')(mongoose),
  ObservationLevel: require('./models/observationlevel')(mongoose),
  ObservationType: require('./models/observationtype')(mongoose)
{'fraction_non_alphanumeric': 0.19214798036995093, 'fraction_numerical': 0.0022650056625141564, 'mean_word_length': 4.968468468468468, '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': '2284968', 'n_tokens_mistral': 835, 'n_tokens_neox': 839, 'n_words': 163}