<commit_before>// web.js
var express = require("express");
var logfmt = require("logfmt");
var route = require("./route.js");
var ECT = require('ect');
var app = express();
var ECT = require('ect');

//ECT env
app.engine('ect', ECT({ watch: true, root: __dirname + '/views', ext: '.ect' }).render);
app.set('view engine', 'ect');

// page controlloer
var paths = ["/", "/login", "/timeline"];
var postApis = ["post"];
var getApis = [];

app.configure(function(){
    app.set('port', process.env.PORT || 3000);
    app.use(logfmt.requestLogger());
    app.engine('ect', ECT({ watch: true, root: __dirname + '/views', ext: '.ect' }).render);
    app.set('view engine', 'ect');
    app.use(express.bodyDecoder());
});

app.configure('development', function(){
  app.use(express.errorHandler());
});

// set route for page controller
for (var i = 0; i < paths.length; i++){
    app.get(paths[i], route.index);
}

// set route post api services
for (var i = 0; i < postApis.length; i++){
    path = "/service/" + postApis[i]
    app.post(path, route.service);
}

// set route get api services
for (var i = 0; i < getApis.length; i++){
    path = "/service/" + getApis[i]
    app.get(path, route.service);
}

app.listen(app.get('port'), function() {
    console.log("Listening on " + app.get('port'));
});
<commit_msg>bug fix<commit_after>// web.js
var express = require("express");
var logfmt = require("logfmt");
var route = require("./route.js");
var ECT = require('ect');
var app = express();
var ECT = require('ect');

//ECT env
app.engine('ect', ECT({ watch: true, root: __dirname + '/views', ext: '.ect' }).render);
app.set('view engine', 'ect');

// page controlloer
var paths = ["/", "/login", "/timeline"];
var postApis = ["post"];
var getApis = [];

app.configure(function(){
    app.set('port', process.env.PORT || 3000);
    app.use(logfmt.requestLogger());
    app.engine('ect', ECT({ watch: true, root: __dirname + '/views', ext: '.ect' }).render);
    app.set('view engine', 'ect');
    app.use(express.bodyParser());
});

app.configure('development', function(){
  app.use(express.errorHandler());
});

// set route for page controller
for (var i = 0; i < paths.length; i++){
    app.get(paths[i], route.index);
}

// set route post api services
for (var i = 0; i < postApis.length; i++){
    path = "/service/" + postApis[i]
    app.post(path, route.service);
}

// set route get api services
for (var i = 0; i < getApis.length; i++){
    path = "/service/" + getApis[i]
    app.get(path, route.service);
}

app.listen(app.get('port'), function() {
    console.log("Listening on " + app.get('port'));
});

{'fraction_non_alphanumeric': 0.2216278181123424, 'fraction_numerical': 0.005349636988918609, 'mean_word_length': 3.848148148148148, 'pattern_counts': {'":': 0, '<': 9, '<?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': '541061', 'n_tokens_mistral': 912, 'n_tokens_neox': 893, 'n_words': 243}