<commit_before>var express = require('express');
var app = express();

app.use(express.static(__dirname + '/public'));

var lists = require('./routes/lists');
app.use('/api/lists', lists);

var todos = require('./routes/todos');
app.use('/api/lists/:list_id/todos', todos);

app.use('/*', function(req, res){
  res.sendfile(__dirname + '/public/index.html');
});

app.get('*', function(req, res){
  res.sendStatus(404);
});

module.exports = app;<commit_msg>Define routes for web app<commit_after>var express = require('express');
var app = express();


/**
 * Web App Routes
 */
app.use(express.static(__dirname + '/public'));

app.get('/lists', function (req, res) {
  res.redirect('/');
});

/**
 * API Routes
 */
var lists = require('./routes/lists');
app.use('/api/lists', lists);

var todos = require('./routes/todos');
app.use('/api/lists/:list_id/todos', todos);

/**
 * Catch-all Route
 */
app.get('*', function(req, res){
  res.sendStatus(404);
});

module.exports = app;
{'fraction_non_alphanumeric': 0.23343527013251783, 'fraction_numerical': 0.0061162079510703364, 'mean_word_length': 4.4860335195530725, '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': '3879683', 'n_tokens_mistral': 343, 'n_tokens_neox': 341, 'n_words': 68}