<commit_before>require('dotenv').config();
var mongoose = require('mongoose');
var multer = require('multer');
var path = require("path");
var cors = require('cors');
var express = require('express');
var bodyParser = require('body-parser');
var load = require('./backend/load_base.js');
var app = require("./authentication/server.js");
var api = require('./backend/model.js').baucis;

app.set('port', (process.env.PORT || 5000));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: true}));
app.use(cors());
app.use('/api', api());
app.use('/bower_components', express.static(__dirname + '/bower_components'));
app.use('/node_modules', express.static(__dirname + '/node_modules'));
app.use('/static', express.static(__dirname + '/static'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));

app.get('/',function(req,res){
  res.sendFile(__dirname + '/index.html');
});

app.get('/detail',function(req,res){
  res.sendFile(__dirname + '/templates/detalle.html');
});

app.get('/carrito',function(req,res){
  res.sendFile(__dirname + '/templates/carrito.html');
});

app.get('/encargo/:number',function(req,res){
  var number = parseInt(req.params.number);
  mongoose.model('encargo').findOne({number: number})
    .exec()
    .then((encargo) => res.send(encargo))
    .catch((err) => res.send(err));
});

app.get('/encargo',function(req,res){
  res.sendFile(__dirname + '/templates/encargo.html');
});

var upload = multer();
app.post('/encargo', upload.array(), function (req, res, next) {<commit_msg>cambio de rutas en express<commit_after>require('dotenv').config();
var mongoose = require('mongoose');
var multer = require('multer');
var path = require("path");
var cors = require('cors');
var express = require('express');
var bodyParser = require('body-parser');
var load = require('./backend/load_base.js');
var app = require("./authentication/server.js");
var api = require('./backend/model.js').baucis;

app.set('port', (process.env.PORT || 5000));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: true}));
app.use(cors());
app.use('/api', api());
app.use('/bower_components', express.static(__dirname + '/bower_components'));
app.use('/node_modules', express.static(__dirname + '/node_modules'));
app.use('/mail', express.static(__dirname + '/static/mail'));
app.use('/static', express.static(__dirname + '/static'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));

app.get('/',function(req,res){
  res.sendFile(__dirname + '/index.html');
});

app.get('/detail',function(req,res){
  res.sendFile(__dirname + '/templates/detalle.html');
});

app.get('/carrito',function(req,res){
  res.sendFile(__dirname + '/templates/carrito.html');
});

app.get('/encargo/:number',function(req,res){
  var number = parseInt(req.params.number);
  mongoose.model('encargo').findOne({number: number})
    .exec()
    .then((encargo) => res.send(encargo))
    .catch((err) => res.send(err));
});

app.get('/encargo',function(req,res){
  res.sendFile(__dirname + '/templates/encargo.html');
});

var upload = multer();
app.post('/encargo', upload.array(), function (req, res, next) {
{'fraction_non_alphanumeric': 0.2274015748031496, 'fraction_numerical': 0.0025196850393700786, 'mean_word_length': 6.0265486725663715, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3237276', 'n_tokens_mistral': 1041, 'n_tokens_neox': 1041, 'n_words': 171}