<commit_before>
/**
 * Module dependencies.
 */

var express = require('express')
  , routes = require('./routes')
  , user = require('./routes/user')
  , http = require('http')
  , path = require('path');

var app = express();

// all environments
app.set('port', process.env.PORT || 2704);
app.set('views', __dirname + '/views');
app.set('view engine', 'ejs');
app.use(express.favicon());
app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(app.router);
app.use(express.static(path.join(__dirname, 'public')));

// development only
if ('development' == app.get('env')) {
  app.use(express.errorHandler());
}


// database
var config = require('./config'),
    mongoose = require('mongoose');

// load models
console.log('load ./models/image'.magenta);

// Bootstrap db connection
console.log('config.db:' + config.db);
var db = mongoose.connect(config.db);


//ROUTES
app.get('/', routes.index);

app.get('/landing', routes.landing);

app.get('/stats', routes.stats);

app.get('/fetch', routes.fetch);

app.get('/grid', routes.grid);



app.get('/edit/published', routes.editPublished);

app.post('/edit/hidden', routes.editHidden);

app.post('/edit/pending', routes.editPending);


// api for editing

app.post('/api/publish', routes.publish);

app.post('/api/hide', routes.hide);

app.post('/api/pend', routes.pend);






http.createServer(app).listen(app.get('port'), function(){
  console.log('Express server listening on port ' + app.get('port'));
});<commit_msg>get not post<commit_after>
/**
 * Module dependencies.
 */

var express = require('express')
  , routes = require('./routes')
  , user = require('./routes/user')
  , http = require('http')
  , path = require('path');

var app = express();

// all environments
app.set('port', process.env.PORT || 2704);
app.set('views', __dirname + '/views');
app.set('view engine', 'ejs');
app.use(express.favicon());
app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(app.router);
app.use(express.static(path.join(__dirname, 'public')));

// development only
if ('development' == app.get('env')) {
  app.use(express.errorHandler());
}


// database
var config = require('./config'),
    mongoose = require('mongoose');

// load models
console.log('load ./models/image'.magenta);

// Bootstrap db connection
console.log('config.db:' + config.db);
var db = mongoose.connect(config.db);


//ROUTES
app.get('/', routes.index);

app.get('/landing', routes.landing);

app.get('/stats', routes.stats);

app.get('/fetch', routes.fetch);

app.get('/grid', routes.grid);



app.get('/edit/published', routes.editPublished);

app.get('/edit/hidden', routes.editHidden);

app.get('/edit/pending', routes.editPending);


// api for editing

app.post('/api/publish', routes.publish);

app.post('/api/hide', routes.hide);

app.post('/api/pend', routes.pend);






http.createServer(app).listen(app.get('port'), function(){
  console.log('Express server listening on port ' + app.get('port'));
});
{'fraction_non_alphanumeric': 0.2205447981621267, 'fraction_numerical': 0.002625533311453889, 'mean_word_length': 4.5926605504587155, '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': '850526', 'n_tokens_mistral': 1017, 'n_tokens_neox': 998, 'n_words': 188}