<commit_before>var express = require('express');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var njwt = require('njwt');

var loginRoute = require('./routes/login');
var userRoute = require('./routes/user');
var scheduleRoute = require('./routes/schedule');

var app = express();

//TODO read from config file
var signingKey = "PLACEHOLDER";

app.use(logger('dev'));
app.use(bodyParser.json({strict: false}));
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());

//validate JWTs here
app.use(function(req,res,next) {
  //TODO is headers correct location for token?<commit_msg>enabled cross origin resource sharing<commit_after>var express = require('express');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var njwt = require('njwt');

var loginRoute = require('./routes/login');
var userRoute = require('./routes/user');
var scheduleRoute = require('./routes/schedule');

var app = express();

//TODO read from config file
var signingKey = "PLACEHOLDER";

app.use(logger('dev'));
app.use(bodyParser.json({strict: false}));
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());

app.use(function(req, res, next) {
  res.header("Access-Control-Allow-Origin", "*");
  res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
  next();
});

//validate JWTs here
app.use(function(req,res,next) {
  //TODO is headers correct location for token?
{'fraction_non_alphanumeric': 0.178117048346056, 'fraction_numerical': 0.0, 'mean_word_length': 5.929515418502203, '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': '4339020', 'n_tokens_mistral': 474, 'n_tokens_neox': 481, 'n_words': 119}